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