public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Lon Hohberger <lon@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: rgmanager: master - rgmanager: Fix ptr arithmetic and C90 warnings Date: Mon, 22 Jun 2009 16:54:00 -0000 [thread overview] Message-ID: <20090622165331.708361201D4@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/rgmanager.git?p=rgmanager.git;a=commitdiff;h=e47ace30364a3d32df9c02c0bd5bcf96bb325b5b Commit: e47ace30364a3d32df9c02c0bd5bcf96bb325b5b Parent: 1344770ae0dc77e39cd1076e1a876894af63d815 Author: Lon Hohberger <lhh@redhat.com> AuthorDate: Fri May 29 09:59:02 2009 -0400 Committer: Lon Hohberger <lhh@redhat.com> CommitterDate: Mon Jun 22 12:49:13 2009 -0400 rgmanager: Fix ptr arithmetic and C90 warnings Signed-off-by: Lon Hohberger <lhh@redhat.com> --- rgmanager/src/clulib/fdops.c | 2 +- rgmanager/src/clulib/logging.c | 2 +- rgmanager/src/clulib/msg_cluster.c | 5 +++-- rgmanager/src/daemons/slang_event.c | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/rgmanager/src/clulib/fdops.c b/rgmanager/src/clulib/fdops.c index ffce53d..afeced9 100644 --- a/rgmanager/src/clulib/fdops.c +++ b/rgmanager/src/clulib/fdops.c @@ -144,7 +144,7 @@ _read_retry(int sockfd, void *buf, int count, struct timeval * timeout) /* * Attempt to read off the socket */ - n = read(sockfd, buf + (off_t) total, remain); + n = read(sockfd, (char*)buf + (off_t) total, remain); /* * When we know our socket was select()ed and we receive 0 bytes diff --git a/rgmanager/src/clulib/logging.c b/rgmanager/src/clulib/logging.c index 0ef5e16..04f06c2 100644 --- a/rgmanager/src/clulib/logging.c +++ b/rgmanager/src/clulib/logging.c @@ -34,7 +34,7 @@ void init_logging(char *name, int foreground, int default_prio) { if (!name) - name = DAEMON_NAME; + name = (char *)DAEMON_NAME; strncpy(daemon_name, name, PATH_MAX); diff --git a/rgmanager/src/clulib/msg_cluster.c b/rgmanager/src/clulib/msg_cluster.c index 2481fd1..d762daa 100644 --- a/rgmanager/src/clulib/msg_cluster.c +++ b/rgmanager/src/clulib/msg_cluster.c @@ -850,12 +850,13 @@ process_cman_msg(cman_handle_t h, void *priv, char *buf, int len, static int cluster_msg_accept(msgctx_t *listenctx, msgctx_t *acceptctx) { - errno = EINVAL; cluster_msg_hdr_t *m; msg_q_t *n; char foo; int err = 0; + errno = EINVAL; + if (!listenctx || !acceptctx) return -1; if (listenctx->u.cluster_info.local_ctx != 0) @@ -1020,7 +1021,7 @@ process_cman_event(cman_handle_t handle, void *private, int reason, int arg) break; } - argp = ((void *)msg + sizeof(cluster_msg_hdr_t)); + argp = ((char *)msg + sizeof(cluster_msg_hdr_t)); *argp = arg; node->len = sizeof(cluster_msg_hdr_t) + sizeof(int); diff --git a/rgmanager/src/daemons/slang_event.c b/rgmanager/src/daemons/slang_event.c index e019fbb..4c09c83 100644 --- a/rgmanager/src/daemons/slang_event.c +++ b/rgmanager/src/daemons/slang_event.c @@ -1163,9 +1163,10 @@ S_user_event(const char *file, const char *script, char *name, int slang_do_script(event_t *pattern, event_t *ev) { - _event_type = ev->ev_type; int ret = 0; + _event_type = ev->ev_type; + switch(ev->ev_type) { case EVENT_NODE: ret = S_node_event(
reply other threads:[~2009-06-22 16:54 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=20090622165331.708361201D4@lists.fedorahosted.org \ --to=lon@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).