From 987afa1a5fba4a2e2089deac31ec2d1aef6cf5c9 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 18 Aug 2021 10:26:48 +0200 Subject: [PATCH] hardlink: Calling posix_fadvise without checking return value [coverity scan] Signed-off-by: Karel Zak --- misc-utils/hardlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc-utils/hardlink.c b/misc-utils/hardlink.c index 4b0abcfe1c..d49f14a358 100644 --- a/misc-utils/hardlink.c +++ b/misc-utils/hardlink.c @@ -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) { -- 2.47.3