]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Tell coverity that we don't care about this errors because they
authorRoy Marples <roy@marples.name>
Tue, 3 May 2016 09:15:28 +0000 (09:15 +0000)
committerRoy Marples <roy@marples.name>
Tue, 3 May 2016 09:15:28 +0000 (09:15 +0000)
are intentional.

compat/arc4random.c

index 0a2f65a3505c6055e37cc93617ae2694991b4538..ab06df04492f96394fe7b0d2897e2c52d8b888d3 100644 (file)
@@ -114,12 +114,16 @@ arc4_stir(struct arc4_stream *as)
        gettimeofday(&rdat.tv, NULL);
        fd = open("/dev/urandom", O_RDONLY);
        if (fd != -1) {
+               /* If there is an error reading, just use what is
+                * on the stack. */
+               /* coverity[check_return] */
                (void)read(fd, rdat.rnd, sizeof(rdat.rnd));
                close(fd);
        }
 
        /* fd < 0?  Ah, what the heck. We'll just take
         * whatever was on the stack... */
+       /* coverity[uninit_use_in_call] */
        arc4_addrandom(as, (void *) &rdat, sizeof(rdat));
 
        /*