arrfab / rpms / libreport

Forked from rpms/libreport 5 years ago
Clone

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

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