<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/games/random, branch release/8.4.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F8.4.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F8.4.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2012-10-25T03:27:53Z</updated>
<entry>
<title>MFC r241847:</title>
<updated>2012-10-25T03:27:53Z</updated>
<author>
<name>Eitan Adler</name>
<email>eadler@FreeBSD.org</email>
</author>
<published>2012-10-25T03:27:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=8422b8f28ca487051453f6011635351c39059766'/>
<id>urn:sha1:8422b8f28ca487051453f6011635351c39059766</id>
<content type='text'>
	Free buf when its no longer used. This helps eliminate a static analysis
	warning.

PR:		ports/172566
Approved by:	cperciva (implicit)
</content>
</entry>
<entry>
<title>Suggections from bde@</title>
<updated>2008-08-11T23:24:42Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2008-08-11T23:24:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=d77b331074778d8a2aab9b362b1e4cd583aef4f3'/>
<id>urn:sha1:d77b331074778d8a2aab9b362b1e4cd583aef4f3</id>
<content type='text'>
1) Split too long source lines
2) Portable code should not assume that null pointer == all-bits-0,
so back out prev. calloc() change.

Submitted by:   bde
</content>
</entry>
<entry>
<title>All cosmetic.</title>
<updated>2008-08-10T11:31:56Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2008-08-10T11:31:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=2a3fabc4d3dbc070216fffb28af70e8066bf3509'/>
<id>urn:sha1:2a3fabc4d3dbc070216fffb28af70e8066bf3509</id>
<content type='text'>
1) Rename RANDOM_MAX to RANDOM_MAX_PLUS1 to not confuse with random()'s max
2) Use calloc() instead of zeroing fields explicitly
3) "too many lines" -&gt; "too many delimiters" for err()
</content>
</entry>
<entry>
<title>1) Fix longstanding math bug with denominator &gt; 1 (wrong probability).</title>
<updated>2008-08-08T02:46:47Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2008-08-08T02:46:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=2c38883d2a5b3b16ad833439c59f9adbf22ceda0'/>
<id>urn:sha1:2c38883d2a5b3b16ad833439c59f9adbf22ceda0</id>
<content type='text'>
Test case:
	random -f some_small_file 10000
(in most cases must be no output)
2) Prevent number of lines &gt; RANDOM_MAX (overflow or nothing may be
choosed) with EFBIG err()
3) After line is found, terminate list loop for -U case too,
since nothing to do in the rest of the loop left.
</content>
</entry>
<entry>
<title>I was confused a bit by the wrong construction with RAND_MAX</title>
<updated>2008-08-08T01:42:17Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2008-08-08T01:42:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=67cc8dbb1a19f0e852db2099ea6011c50c5b4ce1'/>
<id>urn:sha1:67cc8dbb1a19f0e852db2099ea6011c50c5b4ce1</id>
<content type='text'>
used in randomize_fd.c.
Although the max value is the same currently, RAND_MAX is for rand(),
not for random().
So move RANDOM_MAX const to the common file now, make it UL and
use in randomize_fd.c too.
(in any case its old value was 1 less then must be, as noted in
the prev. commit)
</content>
</entry>
<entry>
<title>1) Replace hardcoded RANDOM_MAX macro with wrong (1 less than must be)</title>
<updated>2008-08-08T01:02:30Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2008-08-08T01:02:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=5b6bf07632000ef3c3250b1f9b8f5660c4953052'/>
<id>urn:sha1:5b6bf07632000ef3c3250b1f9b8f5660c4953052</id>
<content type='text'>
value with ((double)RAND_MAX + 1)
2) For exit code increase valid denominator upper range from 255 to 256
since returned value is [0 .. denom - 1]
</content>
</entry>
<entry>
<title>1) Fix hang at the end of line buffer (PR 95715)</title>
<updated>2006-04-14T17:32:27Z</updated>
<author>
<name>Andrey A. Chernov</name>
<email>ache@FreeBSD.org</email>
</author>
<published>2006-04-14T17:32:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=1107d0af309779049db322ab1155408c6927dc28'/>
<id>urn:sha1:1107d0af309779049db322ab1155408c6927dc28</id>
<content type='text'>
2) Localize

PR:             95715
Submitted by:   Li-Lun Wang &lt;llwang@infor.org&gt; (slightly edited by me)
</content>
</entry>
<entry>
<title>Correct an error in the previous revision.  RAND_MAX is the maximum value</title>
<updated>2005-06-22T15:24:00Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2005-06-22T15:24:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=59c2bcbae9e7e1b04e0669a2f6c9906ccb830009'/>
<id>urn:sha1:59c2bcbae9e7e1b04e0669a2f6c9906ccb830009</id>
<content type='text'>
for rand(3), not random(3).  random(3) is defined to return values between
0 and 2^31-1, so add a local RANDOM_MAX constant to this file that is
defined as 2^31-1 and use that in place of RAND_MAX.

Reviewed by:	bde
Approved by:	re (dwhite)
MFC after:	1 week
</content>
</entry>
<entry>
<title>Fix for 64-bit platforms.  random() returns values between 0 and RAND_MAX,</title>
<updated>2005-05-27T15:29:01Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2005-05-27T15:29:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=b0a7bd8e8835b968de897253ad7944d195c540e3'/>
<id>urn:sha1:b0a7bd8e8835b968de897253ad7944d195c540e3</id>
<content type='text'>
and RAND_MAX != LONG_MAX on 64-bit platforms.

PR:		amd64/81279
Submitted by:	Vivek Khera vivek at khera dot org
Submitted by:	Adriaan de Groot groot at kde dot org
MFC after:	1 week
</content>
</entry>
<entry>
<title>Sync program's usage() with manpage's SYNOPSIS.</title>
<updated>2005-02-09T18:22:15Z</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2005-02-09T18:22:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=6324f7db723b0d235c28fc336a97959deb28462e'/>
<id>urn:sha1:6324f7db723b0d235c28fc336a97959deb28462e</id>
<content type='text'>
</content>
</entry>
</feed>
