From 8702fb9bea128f648768d4c723c0d37145f5155e Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 23 Oct 2018 12:57:50 +0200 Subject: [PATCH] coverity: don't warn on fall back random --- src/util-random.c | 2 ++ 1 file changed, 2 insertions(+) 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;