]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r268642:
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 21 Jul 2014 22:44:06 +0000 (22:44 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 21 Jul 2014 22:44:06 +0000 (22:44 +0000)
commita50a3ebf1ccf379dae868a95e65f03edfe11a426
tree7953cd8dcc645e1658f19ca213c84ab171c64e72
parentdda5d15147820637cda1c5e2fe46b9bf6b50816f
MFC r268642:
libc/gen: small updates to code originating at OpenBSD

arc4random.c
- CVS rev. 1.22
Change arc4random_uniform() to calculate ``2**32 % upper_bound'' as
``-upper_bound % upper_bound''. Simplifies the code and makes it the
same on both ILP32 and LP64 architectures, and also slightly faster on
LP64 architectures by using a 32-bit remainder instead of a 64-bit
remainder.
- CVS rev. 1.23
Spacing

readpassphrase.c
-CVS rev. v 1.24
most obvious unsigned char casts for ctype

Obtained from: OpenBSD

git-svn-id: svn://svn.freebsd.org/base/stable/9@268963 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/gen/arc4random.c
lib/libc/gen/readpassphrase.c