Searched refs:upper_bound (Results 1 - 2 of 2) sorted by relevance

/bind-9.11.3/lib/isc/include/isc/
H A Drandom.h113 isc_rng_uniformrandom(isc_rng_t *rngctx, isc_uint16_t upper_bound);
/bind-9.11.3/lib/isc/
H A Drandom.c380 isc_rng_uniformrandom(isc_rng_t *rng, isc_uint16_t upper_bound) { argument
385 if (upper_bound < 2)
390 * upper_bound and contain at least a half of the 16 bit range.
393 if (upper_bound > 0x8000)
394 min = 1 + ~upper_bound; /* 0x8000 - upper_bound */
396 min = (isc_uint16_t)(0x10000 % (isc_uint32_t)upper_bound);
410 return (r % upper_bound);

Completed in 13 milliseconds