summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-12-16 12:57:55 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-12-16 12:57:55 +0100
commit371a8eec29fa25bbf58f4b1f0d7e3bf4c3ad6329 (patch)
tree661f442e4e5c61f56e72241830703267ae08e38b /tools
parent75bfef7fa1c9f71232a282aa66e52b2d1860100a (diff)
downloadrsyslog-371a8eec29fa25bbf58f4b1f0d7e3bf4c3ad6329.tar.gz
rsyslog-371a8eec29fa25bbf58f4b1f0d7e3bf4c3ad6329.tar.xz
rsyslog-371a8eec29fa25bbf58f4b1f0d7e3bf4c3ad6329.zip
some cleanup based on clang static analyzer results
Diffstat (limited to 'tools')
-rw-r--r--tools/omfile.c1
-rw-r--r--tools/omfwd.c2
-rw-r--r--tools/omusrmsg.c1
-rw-r--r--tools/syslogd.c2
4 files changed, 0 insertions, 6 deletions
diff --git a/tools/omfile.c b/tools/omfile.c
index 24de052c..487cf8a0 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -353,7 +353,6 @@ prepareFile(instanceData *pData, uchar *newFileName)
if(access((char*)newFileName, F_OK) != 0) {
/* file does not exist, create it (and eventually parent directories */
- fd = -1;
if(pData->bCreateDirs) {
/* We first need to create parent dirs if they are missing.
* We do not report any errors here ourselfs but let the code
diff --git a/tools/omfwd.c b/tools/omfwd.c
index cbfc36a4..96b365a0 100644
--- a/tools/omfwd.c
+++ b/tools/omfwd.c
@@ -515,7 +515,6 @@ finalize_it:
BEGINparseSelectorAct
uchar *q;
int i;
- int bErr;
rsRetVal localRet;
struct addrinfo;
TCPFRAMINGMODE tcp_framing = TCP_FRAMING_OCTET_STUFFING;
@@ -638,7 +637,6 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
}
/* now skip to template */
- bErr = 0;
while(*p && *p != ';' && *p != '#' && !isspace((int) *p))
++p; /*JUST SKIP*/
diff --git a/tools/omusrmsg.c b/tools/omusrmsg.c
index e61751dc..768baca7 100644
--- a/tools/omusrmsg.c
+++ b/tools/omusrmsg.c
@@ -249,7 +249,6 @@ static rsRetVal wallmsg(uchar* pMsg, instanceData *pData)
}
}
close(ttyf);
- ttyf = -1;
}
}
diff --git a/tools/syslogd.c b/tools/syslogd.c
index a03dcf0e..12d94e9a 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -1190,7 +1190,6 @@ int parseLegacySyslogMsg(msg_t *pMsg, int flags)
{
uchar *p2parse;
int lenMsg;
- int bTAGCharDetected;
int i; /* general index for parsing */
uchar bufParseTAG[CONF_TAG_MAXSIZE];
uchar bufParseHOSTNAME[CONF_HOSTNAME_MAXSIZE];
@@ -1251,7 +1250,6 @@ int parseLegacySyslogMsg(msg_t *pMsg, int flags)
* rgerhards, 2009-06-23: and I now have extended this logic to every character
* that is not a valid hostname.
*/
- bTAGCharDetected = 0;
if(lenMsg > 0 && flags & PARSE_HOSTNAME) {
i = 0;
while(i < lenMsg && (isalnum(p2parse[i]) || p2parse[i] == '.' || p2parse[i] == '.'