arrfab / rpms / libreport

Forked from rpms/libreport 5 years ago
Clone

Blame SOURCES/0016-coverity-Remove-reverse-inull-def30.patch

91b162
From f6a8abe53b5cfe93cb08bbfa1fb5da68b2399dbf Mon Sep 17 00:00:00 2001
91b162
From: Martin Kutlak <mkutlak@redhat.com>
91b162
Date: Mon, 20 Aug 2018 17:12:58 +0200
91b162
Subject: [PATCH] coverity: Remove reverse inull #def30
91b162
91b162
The stat_file cannot be NULL, it would already fail in xfdopen.
91b162
91b162
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
91b162
---
91b162
 src/lib/get_cmdline.c | 3 +--
91b162
 1 file changed, 1 insertion(+), 2 deletions(-)
91b162
91b162
diff --git a/src/lib/get_cmdline.c b/src/lib/get_cmdline.c
91b162
index c15fc193..83c2fb45 100644
91b162
--- a/src/lib/get_cmdline.c
91b162
+++ b/src/lib/get_cmdline.c
91b162
@@ -790,8 +790,7 @@ static int get_process_ppid_at(int pid_proc_fd, pid_t *ppid)
91b162
         r = -2;
91b162
     }
91b162
 
91b162
-    if (stat_file != NULL)
91b162
-        fclose(stat_file);
91b162
+    fclose(stat_file);
91b162
 
91b162
     return r;
91b162
 }
91b162
-- 
91b162
2.17.1
91b162