public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: David Teigland <teigland@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: STABLE3 - fenced: avoid static warnings
Date: Mon, 11 May 2009 15:18:00 -0000	[thread overview]
Message-ID: <20090511151733.EF4651201EC@lists.fedorahosted.org> (raw)

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:


                 reply	other threads:[~2009-05-11 15:18 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=20090511151733.EF4651201EC@lists.fedorahosted.org \
    --to=teigland@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: link
Be 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).