* 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());
}