]> 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>
Tue, 30 Oct 2018 09:21:34 +0000 (10:21 +0100)
src/util-random.c

index eef70e2c3ea6e466e199994bd144afa4e37f41a8..1bade5428b0fc2eec536781e5c9a6a9dfeb4d237 100644 (file)
@@ -36,6 +36,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;
@@ -49,6 +50,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;