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

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