rsyslog/rsyslog-1.17.0-cleanup.patch
2007-07-18 09:09:41 +00:00

97 lines
4.0 KiB
Diff

--- rsyslog-1.17.0/srUtils.c.cleanup 2007-07-17 17:02:23.000000000 +0400
+++ rsyslog-1.17.0/srUtils.c 2007-07-18 11:46:45.000000000 +0400
@@ -153,6 +153,7 @@ int makeFileParentDirs(uchar *szFile, si
*p = '/';
}
free(pszWork);
+ return 0;
}
/*
* vi:set ai:
--- rsyslog-1.17.0/Makefile.am.cleanup 2007-07-18 11:46:59.000000000 +0400
+++ rsyslog-1.17.0/Makefile.am 2007-07-18 11:47:28.000000000 +0400
@@ -1,14 +1,14 @@
-sbin_PROGRAMS=klogd rfc3195d syslogd
+sbin_PROGRAMS=rklogd rfc3195d rsyslogd
-klogd_SOURCES=klogd.c syslog.c pidfile.c ksym.c ksym_mod.c klogd.h ksyms.h pidfile.h module.h
+rklogd_SOURCES=klogd.c syslog.c pidfile.c ksym.c ksym_mod.c klogd.h ksyms.h pidfile.h module.h
rfc3195d_SOURCES=rfc3195d.c rsyslog.h
man_MANS = rfc3195d.8 rklogd.8 rsyslogd.8 rsyslog.conf.5
-syslogd_SOURCES=syslogd.c pidfile.c template.c outchannel.c stringbuf.c srUtils.c parse.c syslogd-types.h template.h outchannel.h syslogd.h stringbuf.h parse.h srUtils.h liblogging-stub.h net.h
-syslogd_CPPFLAGS=$(mysql_includes)
-syslogd_LDADD=$(mysql_libs) $(zlib_libs) $(pthreads_libs)
+rsyslogd_SOURCES=syslogd.c pidfile.c template.c outchannel.c stringbuf.c srUtils.c parse.c syslogd-types.h template.h outchannel.h syslogd.h stringbuf.h parse.h srUtils.h liblogging-stub.h net.h
+rsyslogd_CPPFLAGS=$(mysql_includes)
+rsyslogd_LDADD=$(mysql_libs) $(zlib_libs) $(pthreads_libs)
EXTRA_DIST = doc/bugs.html doc/features.html doc/generic_design.html doc/history.html doc/how2help.html doc/install.html doc/ipv6.html doc/manual.html doc/property_replacer.html doc/rsyslog_conf.html doc/rsyslog_mysql.html doc/rsyslog_packages.html doc/rsyslog_php_syslog_ng.html doc/rsyslog_recording_pri.html doc/rsyslog_stunnel.html doc/status.html doc/syslog-protocol.html doc/version_naming.html doc/contributors.html redhat/rsyslog.conf redhat/rsyslog.init redhat/rsyslog.log redhat/rsyslog.sysconfig debian/rsyslogd freebsd/rsyslogd slackware/rc.rsyslogd rfc3195d.8 rklogd.8 rsyslogd.8 rsyslog.conf.5
--- rsyslog-1.17.0/syslogd.c.cleanup 2007-07-17 18:05:52.000000000 +0400
+++ rsyslog-1.17.0/syslogd.c 2007-07-18 11:46:45.000000000 +0400
@@ -888,7 +888,7 @@ static rsRetVal AddAllowedSenderEntry(st
static rsRetVal AddAllowedSender(struct AllowedSenders **ppRoot, struct AllowedSenders **ppLast,
struct NetAddr *iAllow, uint8_t iSignificantBits)
{
- rsRetVal iRet;
+ rsRetVal iRet = RS_RET_OK;
assert(ppRoot != NULL);
assert(ppLast != NULL);
@@ -1571,7 +1571,7 @@ static void TCPSessAccept(int fd)
int iSess;
struct sockaddr_storage addr;
socklen_t addrlen = sizeof(struct sockaddr_storage);
- int lenHostName;
+ size_t lenHostName;
uchar fromHost[NI_MAXHOST];
uchar fromHostFQDN[NI_MAXHOST];
char *pBuf;
@@ -7452,7 +7452,6 @@ static int doParseOnOffOption(uchar **pp
{
char *pOptStart;
uchar szOpt[32];
- int iRet = -1;
assert(pp != NULL);
assert(*pp != NULL);
@@ -7462,7 +7461,7 @@ static int doParseOnOffOption(uchar **pp
if(getSubString(pp, (char*) szOpt, sizeof(szOpt) / sizeof(uchar), ' ') != 0) {
logerror("Invalid $-configline - could not extract on/off option");
- return;
+ return -1;
}
if(!strcmp(szOpt, "on")) {
@@ -8921,12 +8920,11 @@ static rsRetVal cfline(char *line, regis
f->f_un.f_forw.port = NULL;
if(*p == ':') { /* process port */
- register int i = 0;
uchar * tmp;
*p = '\0'; /* trick to obtain hostname (later)! */
tmp = ++p;
- for( ; *p && isdigit((int) *p) ; ++p, ++i)
+ for(i=0 ; *p && isdigit((int) *p) ; ++p, ++i)
/* SKIP AND COUNT */;
f->f_un.f_forw.port = malloc(i + 1);
if(f->f_un.f_forw.port == NULL) {
--- rsyslog-1.17.0/configure.ac.cleanup 2007-07-17 18:39:59.000000000 +0400
+++ rsyslog-1.17.0/configure.ac 2007-07-18 11:46:45.000000000 +0400
@@ -10,7 +10,9 @@ AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
-
+if test "$GCC" = "yes"
+then CFLAGS="$CFLAGS -W -Wall -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g"
+fi
AC_CANONICAL_HOST
case "${host}" in