]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r268642:
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 21 Jul 2014 22:37:33 +0000 (22:37 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 21 Jul 2014 22:37:33 +0000 (22:37 +0000)
commit56a763bc467d6d463b7bb788b25ace41c5ce2ee7
tree79204e414214fb1bcafa2e7fd142ab3dffc5b7a9
parent6015d1707b37421f6cace21b2d6048caf9ed9721
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/10@268962 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/gen/arc4random.c
lib/libc/gen/readpassphrase.c