summaryrefslogtreecommitdiffstats
path: root/template.c
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 /template.c
parent75bfef7fa1c9f71232a282aa66e52b2d1860100a (diff)
downloadrsyslog-371a8eec29fa25bbf58f4b1f0d7e3bf4c3ad6329.tar.gz
rsyslog-371a8eec29fa25bbf58f4b1f0d7e3bf4c3ad6329.tar.xz
rsyslog-371a8eec29fa25bbf58f4b1f0d7e3bf4c3ad6329.zip
some cleanup based on clang static analyzer results
Diffstat (limited to 'template.c')
-rw-r--r--template.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/template.c b/template.c
index 68c57be1..a5331d57 100644
--- a/template.c
+++ b/template.c
@@ -82,9 +82,9 @@ rsRetVal tplToString(struct template *pTpl, msg_t *pMsg, uchar **ppBuf, size_t *
DEFiRet;
struct templateEntry *pTpe;
int iBuf;
- unsigned short bMustBeFreed;
+ unsigned short bMustBeFreed = 0;
uchar *pVal;
- size_t iLenVal;
+ size_t iLenVal = 0;
assert(pTpl != NULL);
assert(pMsg != NULL);
@@ -980,7 +980,6 @@ void tplDeleteAll(void)
{
struct template *pTpl, *pTplDel;
struct templateEntry *pTpe, *pTpeDel;
- rsRetVal iRetLocal;
BEGINfunc
pTpl = tplRoot;
@@ -1003,7 +1002,7 @@ void tplDeleteAll(void)
case FIELD:
/* check if we have a regexp and, if so, delete it */
if(pTpeDel->data.field.has_regex != 0) {
- if((iRetLocal = objUse(regexp, LM_REGEXP_FILENAME)) == RS_RET_OK) {
+ if(objUse(regexp, LM_REGEXP_FILENAME) == RS_RET_OK) {
regexp.regfree(&(pTpeDel->data.field.re));
}
}
@@ -1029,7 +1028,6 @@ void tplDeleteNew(void)
{
struct template *pTpl, *pTplDel;
struct templateEntry *pTpe, *pTpeDel;
- rsRetVal iRetLocal;
BEGINfunc
@@ -1058,7 +1056,7 @@ void tplDeleteNew(void)
case FIELD:
/* check if we have a regexp and, if so, delete it */
if(pTpeDel->data.field.has_regex != 0) {
- if((iRetLocal = objUse(regexp, LM_REGEXP_FILENAME)) == RS_RET_OK) {
+ if(objUse(regexp, LM_REGEXP_FILENAME) == RS_RET_OK) {
regexp.regfree(&(pTpeDel->data.field.re));
}
}