Changeset View
Changeset View
Standalone View
Standalone View
contrib/ntp/lib/isc/random.c
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
void | void | ||||
isc_random_seed(isc_uint32_t seed) | isc_random_seed(isc_uint32_t seed) | ||||
{ | { | ||||
initialize(); | initialize(); | ||||
#ifndef HAVE_ARC4RANDOM | #ifndef HAVE_ARC4RANDOM | ||||
srand(seed); | srand(seed); | ||||
#else | #else | ||||
markm: redundant (but harmless) #else | |||||
arc4random_addrandom((u_char *) &seed, sizeof(isc_uint32_t)); | |||||
#endif | #endif | ||||
} | } | ||||
void | void | ||||
isc_random_get(isc_uint32_t *val) | isc_random_get(isc_uint32_t *val) | ||||
{ | { | ||||
REQUIRE(val != NULL); | REQUIRE(val != NULL); | ||||
Show All 34 Lines |
redundant (but harmless) #else