]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r309650:
authored <ed@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 20 Dec 2016 08:01:17 +0000 (08:01 +0000)
committered <ed@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 20 Dec 2016 08:01:17 +0000 (08:01 +0000)
commit52aef67607f9bff0ffe8da60c6d8c6de7b5bd774
tree9068ff4580641d05dee3a656d6372626a8f7c11f
parent5802f19fce542cbf6ae32e31d1e224ea06580a33
MFC r309650:

  Properly sign extend the result of jrand48() and mrand48().

  These functions are supposed to return a value between [-2^31, 2^31).
  This doesn't seem to work on 64-bit systems, where we return a value
  between [0, 3^32). Patch up the function to use proper casts to int32_t.
  While there, fix some other style bugs.

git-svn-id: svn://svn.freebsd.org/base/stable/9@310321 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/gen/jrand48.c
lib/libc/gen/mrand48.c