All of lore.kernel.org
 help / color / mirror / Atom feed
From: lhh@sourceware.org <lhh@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/rgmanager ChangeLog src/utils/clustat.c
Date: 15 Aug 2007 18:43:01 -0000	[thread overview]
Message-ID: <20070815184301.7847.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	lhh at sourceware.org	2007-08-15 18:43:00

Modified files:
	rgmanager      : ChangeLog 
	rgmanager/src/utils: clustat.c 

Log message:
	Fix uninitialized var

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&r1=1.56&r2=1.57
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/utils/clustat.c.diff?cvsroot=cluster&r1=1.32&r2=1.33

--- cluster/rgmanager/ChangeLog	2007/08/09 09:22:23	1.56
+++ cluster/rgmanager/ChangeLog	2007/08/15 18:43:00	1.57
@@ -1,3 +1,7 @@
+2007-08-15 Lon Hohberger <lhh@redhat.com>
+	* src/utils/clustat.c: Remove uninitialized var & fix logic /
+	spotted by Ryan McCabe
+
 2007-08-09  Fabio M. Di Nitto <fabbione@ubuntu.com>
 	* rgmanager/src/clulib/alloc.c: Undefine DEBUG when building on
 	PARISC. __builtin_address needs the same love as IA64.
--- cluster/rgmanager/src/utils/clustat.c	2007/04/27 18:10:10	1.32
+++ cluster/rgmanager/src/utils/clustat.c	2007/08/15 18:43:00	1.33
@@ -854,7 +854,7 @@
 int
 main(int argc, char **argv)
 {
-	int fd, qs, ret = 0;
+	int qs, ret = 0;
 	cluster_member_list_t *membership;
 	rg_state_list_t *rgs = NULL;
 	int local_node_id;
@@ -945,25 +945,25 @@
 
 	switch(runtype) {
 	case QSTAT_ONLY:
-		if (fd < 0)
+		if (!ch)
 		       break;
 		ret = !(cman_is_quorate(ch));
 		goto cleanup;
 	case VERSION_ONLY:
 		printf("%s version %s\n", basename(argv[0]),
 		       PACKAGE_VERSION);
-		if (fd < 0)
+		if (!ch)
 		       break;
 		goto cleanup;
 	case NODEID_ONLY:
-		if (fd < 0)
+		if (!ch)
 		       break;
 		local_node_id = get_my_nodeid(ch);
 		printf("0x%08x\n",(uint32_t)(local_node_id)); 
 		goto cleanup;
 	}
 
-	if (fd < 0) {
+	if (!ch) {
 		printf("Could not connect to cluster service\n");
 		return 1;
 	}



             reply	other threads:[~2007-08-15 18:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-15 18:43 lhh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-15 18:41 [Cluster-devel] cluster/rgmanager ChangeLog src/utils/clustat.c lhh
2006-09-27 16:32 lhh

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=20070815184301.7847.qmail@sourceware.org \
    --to=lhh@sourceware.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.