Blame SOURCES/0069-shellcheck-Check-exit-code-directly-with-if-mycmd.patch

8d5775
From 58d1e4fa0a0f6fc2fc3ee773665de70a073ae759 Mon Sep 17 00:00:00 2001
8d5775
From: Martin Kutlak <mkutlak@redhat.com>
8d5775
Date: Wed, 12 Dec 2018 16:16:55 +0100
8d5775
Subject: [PATCH] shellcheck: Check exit code directly with if mycmd
8d5775
8d5775
Running a command and then checking its exit status $? against 0 is redundant.
8d5775
8d5775
Fixes ShellCheck warning SC2181.
8d5775
8d5775
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
8d5775
---
8d5775
 src/plugins/abrt-action-analyze-ccpp-local.in | 8 +++-----
8d5775
 1 file changed, 3 insertions(+), 5 deletions(-)
8d5775
8d5775
diff --git a/src/plugins/abrt-action-analyze-ccpp-local.in b/src/plugins/abrt-action-analyze-ccpp-local.in
8d5775
index 9144c0e6..d2453c19 100644
8d5775
--- a/src/plugins/abrt-action-analyze-ccpp-local.in
8d5775
+++ b/src/plugins/abrt-action-analyze-ccpp-local.in
8d5775
@@ -36,9 +36,7 @@ if $INSTALL_DI; then
8d5775
         fi
8d5775
     done
8d5775
 
8d5775
-    ${EXECUTABLE} ${EXTRA_ARGS} --size_mb=4096
8d5775
-fi
8d5775
-
8d5775
-if [ $? = 0 ]; then
8d5775
-    abrt-action-generate-backtrace && abrt-action-analyze-backtrace
8d5775
+   if ${EXECUTABLE} "${EXTRA_ARGS}" --size_mb=4096; then
8d5775
+       abrt-action-generate-backtrace && abrt-action-analyze-backtrace
8d5775
+   fi
8d5775
 fi
8d5775
-- 
8d5775
2.26.2
8d5775