Commit 9daf4566 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Changpeng Liu
Browse files

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: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0481f938fef2df21af49a2755b3c1fe0dbcaee36
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470554


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent b689bf62
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -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