diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2013-08-21 11:13:56 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-08-22 20:05:14 +0200 |
commit | 6f6f757d31ddbab13e5b4c2c1aad3e7d0dae722a (patch) | |
tree | 1822c777907ffb6ed0f30cdd2ebdf0d63422f8bb | |
parent | 38bf0c9a44ff9dccf38a2ed62a0ad2ad8b58c44e (diff) | |
download | sssd-6f6f757d31ddbab13e5b4c2c1aad3e7d0dae722a.tar.gz sssd-6f6f757d31ddbab13e5b4c2c1aad3e7d0dae722a.tar.bz2 sssd-6f6f757d31ddbab13e5b4c2c1aad3e7d0dae722a.zip |
Use brackets around macros.
warnings reported by cppcheck.
-rw-r--r-- | src/monitor/monitor.c | 8 | ||||
-rw-r--r-- | src/util/child_common.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 67811ac1..7604b309 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -1420,9 +1420,9 @@ static void monitor_quit(struct mt_ctx *mt_ctx, int ret) } } else if (pid != 0) { error = 0; - if WIFEXITED(status) { + if (WIFEXITED(status)) { DEBUG(1, ("Child [%s] exited gracefully\n", svc->name)); - } else if WIFSIGNALED(status) { + } else if (WIFSIGNALED(status)) { DEBUG(1, ("Child [%s] terminated with a signal\n", svc->name)); } else { DEBUG(0, ("Child [%s] did not exit cleanly\n", svc->name)); @@ -2573,11 +2573,11 @@ static void mt_svc_exit_handler(int pid, int wait_status, void *pvt) struct timeval tv; int restart_delay; - if WIFEXITED(wait_status) { + if (WIFEXITED(wait_status)) { DEBUG(SSSDBG_OP_FAILURE, ("Child [%s] exited with code [%d]\n", svc->name, WEXITSTATUS(wait_status))); - } else if WIFSIGNALED(wait_status) { + } else if (WIFSIGNALED(wait_status)) { DEBUG(SSSDBG_OP_FAILURE, ("Child [%s] terminated with signal [%d]\n", svc->name, WTERMSIG(wait_status))); diff --git a/src/util/child_common.c b/src/util/child_common.c index ec2baf01..2bd2bbc3 100644 --- a/src/util/child_common.c +++ b/src/util/child_common.c @@ -553,22 +553,22 @@ void child_sig_handler(struct tevent_context *ev, } else if (ret == 0) { DEBUG(1, ("waitpid did not found a child with changed status.\n")); } else { - if WIFEXITED(child_ctx->child_status) { + if (WIFEXITED(child_ctx->child_status)) { if (WEXITSTATUS(child_ctx->child_status) != 0) { DEBUG(1, ("child [%d] failed with status [%d].\n", ret, WEXITSTATUS(child_ctx->child_status))); } else { DEBUG(4, ("child [%d] finished successfully.\n", ret)); } - } else if WIFSIGNALED(child_ctx->child_status) { + } else if (WIFSIGNALED(child_ctx->child_status)) { DEBUG(1, ("child [%d] was terminated by signal [%d].\n", ret, WTERMSIG(child_ctx->child_status))); } else { - if WIFSTOPPED(child_ctx->child_status) { + if (WIFSTOPPED(child_ctx->child_status)) { DEBUG(7, ("child [%d] was stopped by signal [%d].\n", ret, WSTOPSIG(child_ctx->child_status))); } - if WIFCONTINUED(child_ctx->child_status) { + if (WIFCONTINUED(child_ctx->child_status)) { DEBUG(7, ("child [%d] was resumed by delivery of SIGCONT.\n", ret)); } |