From 4467bf243fb4b553f56a3183b13ab725ebbf276e Mon Sep 17 00:00:00 2001 From: Martin Lindhe Date: Wed, 19 Oct 2016 16:39:26 +0200 Subject: [PATCH] part of conditional expression is always true (!done), found with pvs-studio --- src/hashtable_seed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hashtable_seed.c b/src/hashtable_seed.c index 751e0e3..8aed540 100644 --- a/src/hashtable_seed.c +++ b/src/hashtable_seed.c @@ -168,12 +168,12 @@ static uint32_t generate_seed() { int done = 0; #if !defined(_WIN32) && defined(USE_URANDOM) - if (!done && seed_from_urandom(&seed) == 0) + if (seed_from_urandom(&seed) == 0) done = 1; #endif #if defined(_WIN32) && defined(USE_WINDOWS_CRYPTOAPI) - if (!done && seed_from_windows_cryptoapi(&seed) == 0) + if (seed_from_windows_cryptoapi(&seed) == 0) done = 1; #endif