diff options
author | Walter Doekes <walter+asterisk@wjd.nu> | 2012-04-17 18:57:40 +0000 |
---|---|---|
committer | Walter Doekes <walter+asterisk@wjd.nu> | 2012-04-17 18:57:40 +0000 |
commit | fc63e07135d645af0df8d393aa84c0ae3b7e1924 (patch) | |
tree | f40524fe8e0facf5542c6b02041bc1fc63eae66e /res/res_corosync.c | |
parent | 70c5ac6635062efe03b51fb6c7afd30c22028be9 (diff) |
Avoid cppcheck warnings; removing unused vars and a bit of cleanup.
Patch by: junky
Review: https://reviewboard.asterisk.org/r/1743/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_corosync.c')
-rw-r--r-- | res/res_corosync.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/res/res_corosync.c b/res/res_corosync.c index 9ce44103d..d1c95f9ec 100644 --- a/res/res_corosync.c +++ b/res/res_corosync.c @@ -497,12 +497,12 @@ static void cleanup_module(void) dispatch_thread.alert_pipe[1] = -1; } - if (cpg_handle && (cs_err = cpg_finalize(cpg_handle) != CS_OK)) { + if (cpg_handle && (cs_err = cpg_finalize(cpg_handle)) != CS_OK) { ast_log(LOG_ERROR, "Failed to finalize cpg (%d)\n", (int) cs_err); } cpg_handle = 0; - if (cfg_handle && (cs_err = corosync_cfg_finalize(cfg_handle) != CS_OK)) { + if (cfg_handle && (cs_err = corosync_cfg_finalize(cfg_handle)) != CS_OK) { ast_log(LOG_ERROR, "Failed to finalize cfg (%d)\n", (int) cs_err); } cfg_handle = 0; @@ -514,12 +514,12 @@ static int load_module(void) enum ast_module_load_result res = AST_MODULE_LOAD_FAILURE; struct cpg_name name; - if ((cs_err = corosync_cfg_initialize(&cfg_handle, &cfg_callbacks) != CS_OK)) { + if ((cs_err = corosync_cfg_initialize(&cfg_handle, &cfg_callbacks)) != CS_OK) { ast_log(LOG_ERROR, "Failed to initialize cfg (%d)\n", (int) cs_err); return AST_MODULE_LOAD_DECLINE; } - if ((cs_err = cpg_initialize(&cpg_handle, &cpg_callbacks) != CS_OK)) { + if ((cs_err = cpg_initialize(&cpg_handle, &cpg_callbacks)) != CS_OK) { ast_log(LOG_ERROR, "Failed to initialize cpg (%d)\n", (int) cs_err); goto failed; } |