From d86733fa54ae24a67678b5f3f437063435378053 Mon Sep 17 00:00:00 2001 From: Mateusz Moscicki Date: Mon, 26 Feb 2018 08:17:53 +0100 Subject: [PATCH] Fixed code style Code has been changed to avoid messages: (CODE_SMELL/Warning) Remove this unused "ret" local variable. (CODE_SMELL/Warning) Remove this unused "command" local variable. In addition, the code has been modified to remove unnecessary bracket. Change-Id: I5bf9820d16f7b7947844e078eba9a1bab11ddd6c --- src/crash-manager/crash-manager.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/crash-manager/crash-manager.c b/src/crash-manager/crash-manager.c index f25c486..580cb3c 100644 --- a/src/crash-manager/crash-manager.c +++ b/src/crash-manager/crash-manager.c @@ -450,8 +450,11 @@ static int dump_system_state(void) } static void execute_crash_modules(int argc, char *argv[]) { + +#if defined(TIZEN_ENABLE_COREDUMP) || defined(TIZEN_FEATURE_PTRACE_CALLSTACK) int ret; char command[PATH_MAX]; +#endif #ifdef TIZEN_ENABLE_COREDUMP /* Execute crash-pipe */ @@ -471,7 +474,8 @@ static void execute_crash_modules(int argc, char *argv[]) # ifdef SYS_ASSERT /* Use ptrace version as fallback if sys-assert failed to * generate report */ - if (!crash_info.have_sysassert_report) { + if (crash_info.have_sysassert_report) + return; # endif /* Execute crash-stack */ if (argc > 8) @@ -493,11 +497,8 @@ static void execute_crash_modules(int argc, char *argv[]) _E("Failed to snprintf for crash-stack command"); return; } - system_command(command); -# ifdef SYS_ASSERT - } -# endif + system_command(command); #endif /* TIZEN_FEATURE_PTRACE_CALLSTACK */ } -- 2.7.4