public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Christine Caulfield <chrissie@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: master - cman: Don't return "error: Success" - it's just embarrassing. Date: Thu, 29 Jan 2009 13:52:00 -0000 [thread overview] Message-ID: <20090129135226.B5665120569@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=a1620c2b08020ec676f4e0ab451f627393124142 Commit: a1620c2b08020ec676f4e0ab451f627393124142 Parent: 4ec60b52bca8f5d44ad35b8ad3754fc6e2463d3c Author: Christine Caulfield <ccaulfie@redhat.com> AuthorDate: Thu Jan 29 13:51:53 2009 +0000 Committer: Christine Caulfield <ccaulfie@redhat.com> CommitterDate: Thu Jan 29 13:51:53 2009 +0000 cman: Don't return "error: Success" - it's just embarrassing. Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> --- cman/services/cman/lib/libcman.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cman/services/cman/lib/libcman.c b/cman/services/cman/lib/libcman.c index 22c51f8..7c575a3 100644 --- a/cman/services/cman/lib/libcman.c +++ b/cman/services/cman/lib/libcman.c @@ -143,7 +143,7 @@ static int refresh_node_list(struct cman_inst *cman_inst) votequorum_trackstart(cman_inst->cmq_handle, 0, CS_TRACK_CURRENT); error = votequorum_dispatch(cman_inst->cmq_handle, CS_DISPATCH_ONE); - return error; + return (error==CS_OK?0:-1); } cman_handle_t cman_init ( @@ -272,7 +272,7 @@ int cman_start_recv_data ( errno = error = res.error; error_exit: - return (error?-1:0); + return (error==CS_OK?0:-1); } int cman_end_recv_data ( @@ -333,7 +333,7 @@ int cman_get_node_addrs ( error = corosync_cfg_get_node_addrs(cman_inst->cfg_handle, nodeid, max_addrs, num_addrs, (corosync_cfg_node_address_t *)addrs); - return (error?-1:0); + return (error==CS_OK?0:-1); } int cman_send_data(cman_handle_t handle, const void *message, int len, int flags, uint8_t port, int nodeid) @@ -529,7 +529,7 @@ int cman_kill_node(cman_handle_t handle, int nodeid) error = corosync_cfg_kill_node(cman_inst->cfg_handle, nodeid, "Killed by cman_tool"); - return error; + return (error==CS_OK?0:-1); } int cman_set_votes(cman_handle_t handle, int votes, int nodeid) @@ -545,7 +545,7 @@ int cman_set_votes(cman_handle_t handle, int votes, int nodeid) error = votequorum_setvotes(cman_inst->cmq_handle, nodeid, votes); - return error; + return (error==CS_OK?0:-1); } int cman_set_expected_votes(cman_handle_t handle, int expected) @@ -561,7 +561,7 @@ int cman_set_expected_votes(cman_handle_t handle, int expected) error = votequorum_setexpected(cman_inst->cmq_handle, expected); - return error; + return (error==CS_OK?0:-1); } int cman_get_fd (
reply other threads:[~2009-01-29 13:52 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090129135226.B5665120569@lists.fedorahosted.org \ --to=chrissie@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).