Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Aug 2014 21:57:24 +0800
From:      Chenguang Li <horus.li@gmail.com>
To:        Peter Pentchev <roam@ringlet.net>
Cc:        freebsd-hackers@freebsd.org, Vitaly Magerya <vmagerya@gmail.com>
Subject:   Re: On changing rand(3) to random(3) in awk(1)
Message-ID:  <E02AE8AA-0974-42C6-AC83-C257DAFE329A@gmail.com>
In-Reply-To: <20140828133846.GB2385@straylight.m.ringlet.net>
References:  <F70B9462-0898-47EF-AF83-47509F21F84E@gmail.com> <53FEFBB8.5040305@gmail.com> <20140828131526.GA2385@straylight.m.ringlet.net> <5C40F611-22EB-49E4-8925-37922E771C0F@gmail.com> <20140828133846.GB2385@straylight.m.ringlet.net>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Peter Pentchev <roam@ringlet.net> wrote:

>> ... ...
>> [omitted]
>
> Right, but you've hard-coded RANDOM_MAX to 2^32-1.  I don't think this
> is correct; I do believe that you should use LONG_MAX for this value.
> Of course, #define RANDOM_MAX LONG_MAX could be fine for this purpose
> here, but the point is to use LONG_MAX instead of 2^32-1.

I got your point, updated again. :)

Chenguang Li

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJT/zVKAAoJELG4cS+11lRh7Q4P+wVrPEq6iLXZAgYCUYoaQcik
DWLesOxLszjxr1nyx7kHD/vbBE04frhWbJZyBzmkmsLasXPckJxWpejpJGPwUGLX
DpCyihobe94SUYwcXbnZ23Yv638dMGWWUptZuWkFe8L7CGUCF1nMwOpCh48U1t9E
afDDxDdO8B6FOrAkCuqK5zEmC7yHGqLmG7p054MszG2wlnr8WVXK8xUho2GNccRM
ykrpeFBIthzTQrM1UWX9IYmQSDD4nuUYwaL6wR0Jm/p0bhQzeZ01564I2FjkhZzz
sKThSsFDjeNS49kQn30FnhbAn7+XfRd0DyWDl/Huaxvw63g4FbhkNUyiECKIiuyk
A06Cr6pPeWJxRrsODacXdAhl8LCOQdrXo0XP/HXzT8a3TulCBxE/3v/s8WkJgPTd
M8xQ5COtnJOW6GpYnq9cUF2KnelVrwb28N+6ThssRANNepMZ/dGljVoW1u2qBV+H
cIn4wZFK++wo3skh4KS66RcfDkP083vsD+5SO742vBaobDxMXuU9jT4xytRW9twv
GIl6c86aRhqUaa9FNgE2NGM4hDlyQgTO+I5npAo83JQGq93G5FikjYNA8SweqtrM
PwnrIRhiVOMCvLW6Wr0eOUa2/c2WM+Zqb7B3Aoo8H1hAwN6C2SGpLhyY37Vja8Kd
nFS/nlVdHpd2LDBV9+vH
=gCzN
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E02AE8AA-0974-42C6-AC83-C257DAFE329A>