From: Victor Julien Date: Tue, 23 Oct 2018 10:57:50 +0000 (+0200) Subject: coverity: don't warn on fall back random X-Git-Tag: suricata-4.0.6~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8702fb9bea128f648768d4c723c0d37145f5155e;p=thirdparty%2Fsuricata.git coverity: don't warn on fall back random --- diff --git a/src/util-random.c b/src/util-random.c index b2945e53b6..d1fadc66b1 100644 --- a/src/util-random.c +++ b/src/util-random.c @@ -34,6 +34,7 @@ static long int RandomGetClock(void) struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); + // coverity[dont_call : FALSE] srandom(ts.tv_nsec ^ ts.tv_sec); long int value = random(); return value; @@ -47,6 +48,7 @@ static long int RandomGetPosix(void) memset(&tv, 0, sizeof(tv)); gettimeofday(&tv, NULL); + // coverity[dont_call : FALSE] srandom(tv.tv_usec ^ tv.tv_sec); long int value = random(); return value;