public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - fenced: avoid static warnings
@ 2009-05-11 15:18 David Teigland
  0 siblings, 0 replies; only message in thread
From: David Teigland @ 2009-05-11 15:18 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=160d8dea8b9dae39f80cd79f3b716b346d571204
Commit:        160d8dea8b9dae39f80cd79f3b716b346d571204
Parent:        0bee5b75ac8c6c8dfbf55e3dcd1c6fb70a505fe6
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Mon May 11 10:09:56 2009 -0500
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Mon May 11 10:09:56 2009 -0500

fenced: avoid static warnings

By using a variable "default" string instead of a static one.

Signed-off-by: David Teigland <teigland@redhat.com>
---
 fence/fenced/main.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/fence/fenced/main.c b/fence/fenced/main.c
index 9600129..c1d96de 100644
--- a/fence/fenced/main.c
+++ b/fence/fenced/main.c
@@ -423,9 +423,12 @@ static void query_domain_nodes(int f, int option, int max)
 static void process_connection(int ci)
 {
 	struct fenced_header h;
+	char default_name[8];
 	char *extra = NULL;
 	int rv, extra_len;
 
+	strcpy(default_name, "default");
+
 	rv = do_read(client[ci].fd, &h, sizeof(h));
 	if (rv < 0) {
 		log_debug("connection %d read error %d", ci, rv);
@@ -460,13 +463,13 @@ static void process_connection(int ci)
 
 	switch (h.command) {
 	case FENCED_CMD_JOIN:
-		do_join("default");
+		do_join(default_name);
 		break;
 	case FENCED_CMD_LEAVE:
-		do_leave("default");
+		do_leave(default_name);
 		break;
 	case FENCED_CMD_EXTERNAL:
-		do_external("default", extra, extra_len);
+		do_external(default_name, extra, extra_len);
 		break;
 	case FENCED_CMD_DUMP_DEBUG:
 	case FENCED_CMD_NODE_INFO:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-11 15:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-11 15:18 cluster: STABLE3 - fenced: avoid static warnings David Teigland

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).