arrfab / rpms / libreport

Forked from rpms/libreport 5 years ago
Clone

Blame SOURCES/0017-coverity-Remove-deadcode-def47.patch

91b162
From 94ffb1d8287530ed0fb87b8aa7d693ba754a9387 Mon Sep 17 00:00:00 2001
91b162
From: Martin Kutlak <mkutlak@redhat.com>
91b162
Date: Tue, 21 Aug 2018 13:06:51 +0200
91b162
Subject: [PATCH] coverity: Remove deadcode #def47
91b162
91b162
Value of not_reportable was already checked for NULL/empty value and
91b162
therefore the ternary expression must be True and will never result in """".
91b162
91b162
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
91b162
---
91b162
 src/report-newt/report-newt.c | 5 ++---
91b162
 1 file changed, 2 insertions(+), 3 deletions(-)
91b162
91b162
diff --git a/src/report-newt/report-newt.c b/src/report-newt/report-newt.c
91b162
index 61e279d1..d0585125 100644
91b162
--- a/src/report-newt/report-newt.c
91b162
+++ b/src/report-newt/report-newt.c
91b162
@@ -327,9 +327,8 @@ static int report(const char *dump_dir_name)
91b162
     {
91b162
         char *reason = dd_load_text_ext(dd, FILENAME_REASON, 0
91b162
                                         | DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE);
91b162
-        char *t = xasprintf("%s%s%s",
91b162
-                            not_reportable ? : "",
91b162
-                            not_reportable ? " " : "",
91b162
+        char *t = xasprintf("%s %s",
91b162
+                            not_reportable,
91b162
                             reason ? : _("(no description)"));
91b162
 
91b162
         newtWinMessage(_("Error"), _("Ok"), (char *)"%s", t);
91b162
-- 
91b162
2.17.1
91b162