public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* rgmanager: master - rgmanager: Fix ptr arithmetic and C90 warnings
@ 2009-06-22 16:54 Lon Hohberger
0 siblings, 0 replies; only message in thread
From: Lon Hohberger @ 2009-06-22 16:54 UTC (permalink / raw)
To: cluster-cvs-relay
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(
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-22 16:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-22 16:54 rgmanager: master - rgmanager: Fix ptr arithmetic and C90 warnings Lon Hohberger
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).