lib/iscsi: Remove code included if and only if USE_RANDOM is defined
USE_RANDOM is not defined anywhere in SPDK since long ago. Hence remove the code included if and only if USE_RANDOM is defined in lib/iscsi.c. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I0481f938fef2df21af49a2755b3c1fe0dbcaee36 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470554 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
b689bf62fb
commit
9daf456696
@ -152,16 +152,6 @@ arc4random(void)
|
||||
static void
|
||||
gen_random(uint8_t *buf, size_t len)
|
||||
{
|
||||
#ifdef USE_RANDOM
|
||||
long l;
|
||||
size_t idx;
|
||||
|
||||
srandomdev();
|
||||
for (idx = 0; idx < len; idx++) {
|
||||
l = random();
|
||||
buf[idx] = (uint8_t) l;
|
||||
}
|
||||
#else
|
||||
uint32_t r;
|
||||
size_t idx;
|
||||
|
||||
@ -169,7 +159,6 @@ gen_random(uint8_t *buf, size_t len)
|
||||
r = arc4random();
|
||||
buf[idx] = (uint8_t) r;
|
||||
}
|
||||
#endif /* USE_RANDOM */
|
||||
}
|
||||
|
||||
static uint64_t
|
||||
|
Loading…
Reference in New Issue
Block a user