cluster/rgmanager ChangeLog src/utils/clustat.c
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
rgmanager/ChangeLog +4 -0
@@ -1,3 +1,7 @@ +2007-08-15 Lon Hohberger <[email protected]> + * src/utils/clustat.c: Remove uninitialized var & fix logic / + spotted by Ryan McCabe + 2007-08-09 Fabio M. Di Nitto <[email protected]> * rgmanager/src/clulib/alloc.c: Undefine DEBUG when building on PARISC. __builtin_address needs the same love as IA64.
rgmanager/src/utils/clustat.c +5 -5
@@ -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 ; }