cluster/ccs/lib libccs.c
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rmccabe at sourceware.org 2007-10-26 19:18:10
Modified files:
ccs/lib : libccs.c
Log message:
Keep gcc from reporting a bogus warning when compiling with -Wformat=2
ccs/lib/libccs.c +4 -4
@@ -702,7 +702,6 @@** Try to match against each clusternode in cluster.conf. */ for (i =1 ; ; i++) { -const char *pathstr =NULL ;char canonical_name[128 ];unsigned int altcnt;
@@ -717,7 +716,9 @@char cur_node[128 ];if (altcnt !=0 ) { - ret =snprintf (path,sizeof (path), pathstr, i, altcnt); + ret =snprintf (path,sizeof (path), +"/cluster/clusternodes/clusternode[%u]/altname[%u]/@name" , + i, altcnt);if (ret <0 || (size_t ) ret >=sizeof (path))continue ; }
@@ -788,8 +789,7 @@free (str); -/* Try any altnames */ - pathstr ="/cluster/clusternodes/clusternode[%u]/altname[%u]/@name" ; +/* Now try any altnames */ } }