Date: Thu, 4 Jul 2013 00:02:11 +0000 (UTC) From: "Andrey A. Chernov" <ache@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252668 - head/lib/libc/stdlib Message-ID: <201307040002.r6402Bla072341@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ache Date: Thu Jul 4 00:02:10 2013 New Revision: 252668 URL: http://svnweb.freebsd.org/changeset/base/252668 Log: After fixing ranges restore POSIX requirement: rand() call without srand() must be the same as srand(1); rand(); (yet one increment) Modified: head/lib/libc/stdlib/rand.c Modified: head/lib/libc/stdlib/rand.c ============================================================================== --- head/lib/libc/stdlib/rand.c Thu Jul 4 00:00:59 2013 (r252667) +++ head/lib/libc/stdlib/rand.c Thu Jul 4 00:02:10 2013 (r252668) @@ -99,7 +99,12 @@ rand_r(unsigned int *ctx) } -static u_long next = 1; +static u_long next = +#ifdef USE_WEAK_SEEDING + 1; +#else + 2; +#endif int rand()
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307040002.r6402Bla072341>