[Cluster-devel] cluster cman/qdisk/clulog.c cman/qdisk/disk.c ...
rmccabe at sourceware.org
rmccabe at sourceware.org
Mon Oct 29 20:38:14 UTC 2007
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: rmccabe at sourceware.org 2007-10-29 20:38:13
Modified files:
cman/qdisk : clulog.c disk.c
fence/fenced : agent.c
gulm/src : gulm_tool.c
rgmanager/src/clulib: clulog.c
Log message:
Fix a bunch of format string errors.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/clulog.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.2&r2=1.1.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/disk.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.3&r2=1.1.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/fenced/agent.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.7.2.7&r2=1.7.2.8
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gulm/src/gulm_tool.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.6.2.2&r2=1.6.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/clulog.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2.2.4&r2=1.2.2.5
--- cluster/cman/qdisk/clulog.c 2007/01/22 22:50:38 1.1.2.2
+++ cluster/cman/qdisk/clulog.c 2007/10/29 20:38:12 1.1.2.3
@@ -273,7 +273,7 @@
fprintf(stdout, "%s", printmsg);
}
- syslog(severity, logmsg);
+ syslog(severity, "%s", logmsg);
pthread_mutex_unlock(&log_mutex);
--- cluster/cman/qdisk/disk.c 2006/06/23 16:01:02 1.1.2.3
+++ cluster/cman/qdisk/disk.c 2007/10/29 20:38:12 1.1.2.4
@@ -679,7 +679,7 @@
}
/* Copy in the cluster/label name */
- snprintf(qh.qh_cluster, sizeof(qh.qh_cluster)-1, label);
+ snprintf(qh.qh_cluster, sizeof(qh.qh_cluster)-1, "%s", label);
if ((qh.qh_timestamp = (uint64_t)time(NULL)) <= 0) {
perror("time");
--- cluster/fence/fenced/agent.c 2006/12/20 18:14:29 1.7.2.7
+++ cluster/fence/fenced/agent.c 2007/10/29 20:38:13 1.7.2.8
@@ -47,7 +47,7 @@
strcat(msg, buf);
printf("%s\n", msg);
- syslog(LOG_ERR, msg);
+ syslog(LOG_ERR, "%s", msg);
memset(buf, 0, sizeof(buf));
memset(msg, 0, sizeof(msg));
--- cluster/gulm/src/Attic/gulm_tool.c 2005/01/12 19:16:10 1.6.2.2
+++ cluster/gulm/src/Attic/gulm_tool.c 2007/10/29 20:38:13 1.6.2.3
@@ -89,7 +89,7 @@
{
int i;
for(i=0; usage[i][0]; i++)
- printf(usage[i]);
+ printf("%s", usage[i]);
exit(0);
}
--- cluster/rgmanager/src/clulib/clulog.c 2007/05/03 15:02:46 1.2.2.4
+++ cluster/rgmanager/src/clulib/clulog.c 2007/10/29 20:38:13 1.2.2.5
@@ -20,7 +20,7 @@
/** @file
* Library routines for communicating with the logging daemon.
*
- * $Id: clulog.c,v 1.2.2.4 2007/05/03 15:02:46 lhh Exp $
+ * $Id: clulog.c,v 1.2.2.5 2007/10/29 20:38:13 rmccabe Exp $
*
* Author: Jeff Moyer <moyer at missioncriticallinux.com>
*/
@@ -50,7 +50,7 @@
#include <string.h>
-static const char *version __attribute__ ((unused)) = "$Revision: 1.2.2.4 $";
+static const char *version __attribute__ ((unused)) = "$Revision: 1.2.2.5 $";
#ifdef DEBUG
#include <assert.h>
@@ -302,7 +302,7 @@
}
/* TODO make this non-blocking */
- syslog(severity, logmsg);
+ syslog(severity, "%s", logmsg);
pthread_mutex_unlock(&log_mutex);
More information about the Cluster-devel
mailing list