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

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