]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
utils: silence a coverity warning
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 7 Aug 2017 08:26:18 +0000 (10:26 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 7 Aug 2017 08:32:58 +0000 (10:32 +0200)
There's no real change, as the function is documented to possibly
return only zero or one in this case.

lib/utils.c

index 66b71ff35a3644eaf377ec2716937ccc4a7dae3a..f1195a634d3be865977e2cba8e1f6c8dbb0c2026 100644 (file)
@@ -142,7 +142,7 @@ static int seed_file(const char *fname, char *buf, size_t buflen)
                if (ferror(fp)) {
                        return kr_error(ferror(fp));
                }
-               if (fread(buf, buflen, 1, fp)) { /* read in one chunk for simplicity */
+               if (fread(buf, buflen, 1, fp) == 1) { /* read in one chunk for simplicity */
                        return kr_ok();
                }
        } while (true);