From 9daf456696ee19d215f6fe2d3a522e579948ae88 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Mon, 7 Oct 2019 07:19:09 +0900 Subject: [PATCH] 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 Change-Id: I0481f938fef2df21af49a2755b3c1fe0dbcaee36 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470554 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Changpeng Liu --- lib/iscsi/iscsi.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index 8e02ac170..b1bc43119 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -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