]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
coverity: don't warn on fall back random
authorVictor Julien <victor@inliniac.net>
Tue, 23 Oct 2018 10:57:50 +0000 (12:57 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 1 Nov 2018 14:46:10 +0000 (15:46 +0100)
src/util-random.c

index b2945e53b69c1ce1fde8e166416218f0580dddb9..d1fadc66b1c948603f6bb728f52563e6690ff3d7 100644 (file)
@@ -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;