]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hardlink: Calling posix_fadvise without checking return value [coverity scan]
authorKarel Zak <kzak@redhat.com>
Wed, 18 Aug 2021 08:26:48 +0000 (10:26 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 18 Aug 2021 08:26:48 +0000 (10:26 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/hardlink.c

index 4b0abcfe1cbfbe31fb2b6acb70e51c77ce5dde19..d49f14a358ea2b59ada8e21109cfd298dd6769aa 100644 (file)
@@ -571,8 +571,8 @@ static int file_contents_equal(const struct file *a, const struct file *b)
                goto err;
 
 #if defined(POSIX_FADV_SEQUENTIAL) && defined(HAVE_POSIX_FADVISE)
-       posix_fadvise(fileno(fa), 0, 0, POSIX_FADV_SEQUENTIAL);
-       posix_fadvise(fileno(fb), 0, 0, POSIX_FADV_SEQUENTIAL);
+       ignore_result( posix_fadvise(fileno(fa), 0, 0, POSIX_FADV_SEQUENTIAL) );
+       ignore_result( posix_fadvise(fileno(fb), 0, 0, POSIX_FADV_SEQUENTIAL) );
 #endif
 
        while (!handle_interrupt() && cmp == 0) {