svn commit: r219939 - head/lib/libutil

Xin LI delphij at delphij.net
Thu Mar 24 01:32:04 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

On 03/23/11 17:29, Alexander Best wrote:
> On Wed Mar 23 11, Xin LI wrote:
>> Author: delphij
>> Date: Wed Mar 23 22:08:01 2011
>> New Revision: 219939
>> URL: http://svn.freebsd.org/changeset/base/219939
>>
>> Log:
>>   humanize_number(3) multiply the input number by 100, which could cause an
>>   integer overflow when the input is very large (for example, 100 Pi would
>>   become about 10 Ei which exceeded signed int64_t).
> 
> i think we should also change the humanize_number(3) manual page accordingly.
> here's a rough draft (date not bumped, yet).

I think matching the variables within source code would not be necessary
- -- I think it's much more clear to the reader of the manual page when
the parameter called "number" and not "quotient" when the function is
called "humanize_number".

I am not sure about the CAVEATS part though, to me, it's kinda obvious
since a parameter of signed int64_t can represent only a maximum number
of INT64_MAX and a minimum number of INT64_MIN, and I think we don't
document these explicitly for other manual pages.  Personally I am
inclined not to document this as limitation at all but would not object
doing so.

Cheers,
- -- 
Xin LI <delphij at delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!	       Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)

iQEcBAEBCAAGBQJNip8CAAoJEATO+BI/yjfBz3YH/3YDlfvf8Bty6NeBnk3CyxjE
skeaowGWIG5/gQ73zXfc1KTBEr5CobNLZWxuvGnXGCfMdATypRQR+5yQt366tQNK
oDvd60tMofztH6rtrBt9b/td2mIoQAfX9Mc0X9ri69LgkExXVQBxqAcxkYxVadGm
r+nAkhZjpaHdz20eDXbQg7wDXd3iGEBYx1wagMIBLtVeJL0GFKABXIHiZfbcBU9S
tZNlXpeF3SXqOIql9KEeJ9+Zq8neU2sE7J1y3Jph4j8kkN39CABzNNKUHH7KLl7/
mD9mPKxILulDMkropntEU3G7uE2Y1Ax9o7PcjMbd509/bpzZK2SP4t28VSQg1/8=
=ODAn
-----END PGP SIGNATURE-----


More information about the svn-src-all mailing list