X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/2d21ac55c334faf3a56e5634905ed6987fc787d4..cc8bc92ae4a8e9f1a1ab61bf83d34ad8150b3405:/bsd/libkern/random.c diff --git a/bsd/libkern/random.c b/bsd/libkern/random.c index 920ae5c60..070080f90 100644 --- a/bsd/libkern/random.c +++ b/bsd/libkern/random.c @@ -70,11 +70,11 @@ * and whatever else we might use it for. The result is uniform on * [0, 2^31 - 1]. */ -u_long +u_int32_t random(void) { /* Zero all but bottom 31 bits, also works for 64-bit longs */ - u_long mask = (u_long)-1 >> ((sizeof(u_long) * 8) - 31); + u_int32_t mask = (u_int32_t)-1 >> ((sizeof(u_int32_t) * 8) - 31); return (mask & RandomULong()); }