summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-12-16 13:00:27 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-12-16 13:00:27 +0100
commit4da2cbcae7d55a1a9877b3eee4cbce5bb2540a21 (patch)
tree70b8123a9d7d648fe007e8f6c01466e9b26fd4e1 /runtime
parentc4c20c18aae7c95c1e69c10d2ea9efbc3c2c1913 (diff)
parent371a8eec29fa25bbf58f4b1f0d7e3bf4c3ad6329 (diff)
downloadrsyslog-4da2cbcae7d55a1a9877b3eee4cbce5bb2540a21.tar.gz
rsyslog-4da2cbcae7d55a1a9877b3eee4cbce5bb2540a21.tar.xz
rsyslog-4da2cbcae7d55a1a9877b3eee4cbce5bb2540a21.zip
Merge branch 'v4-stable' into v4-devel
Conflicts: runtime/parser.c
Diffstat (limited to 'runtime')
-rw-r--r--runtime/cfsysline.c4
-rw-r--r--runtime/conf.c2
-rw-r--r--runtime/ctok.c4
-rw-r--r--runtime/debug.c6
-rw-r--r--runtime/msg.c4
-rw-r--r--runtime/parser.c2
-rw-r--r--runtime/queue.c5
-rw-r--r--runtime/wtp.c2
8 files changed, 11 insertions, 18 deletions
diff --git a/runtime/cfsysline.c b/runtime/cfsysline.c
index 5df8e64c..5ab73184 100644
--- a/runtime/cfsysline.c
+++ b/runtime/cfsysline.c
@@ -963,11 +963,11 @@ void dbgPrintCfSysLineHandlers(void)
dbgprintf("Sytem Line Configuration Commands:\n");
llCookieCmd = NULL;
- while((iRet = llGetNextElt(&llCmdList, &llCookieCmd, (void*)&pCmd)) == RS_RET_OK) {
+ while(llGetNextElt(&llCmdList, &llCookieCmd, (void*)&pCmd) == RS_RET_OK) {
llGetKey(llCookieCmd, (void*) &pKey); /* TODO: using the cookie is NOT clean! */
dbgprintf("\tCommand '%s':\n", pKey);
llCookieCmdHdlr = NULL;
- while((iRet = llGetNextElt(&pCmd->llCmdHdlrs, &llCookieCmdHdlr, (void*)&pCmdHdlr)) == RS_RET_OK) {
+ while(llGetNextElt(&pCmd->llCmdHdlrs, &llCookieCmdHdlr, (void*)&pCmdHdlr) == RS_RET_OK) {
dbgprintf("\t\ttype : %d\n", pCmdHdlr->eType);
dbgprintf("\t\tpData: 0x%lx\n", (unsigned long) pCmdHdlr->pData);
dbgprintf("\t\tHdlr : 0x%lx\n", (unsigned long) pCmdHdlr->cslCmdHdlr);
diff --git a/runtime/conf.c b/runtime/conf.c
index e2d3a889..bbd2147a 100644
--- a/runtime/conf.c
+++ b/runtime/conf.c
@@ -1084,7 +1084,7 @@ static rsRetVal cflineDoAction(uchar **p, action_t **ppAction)
DEFiRet;
modInfo_t *pMod;
omodStringRequest_t *pOMSR;
- action_t *pAction;
+ action_t *pAction = NULL;
void *pModData;
ASSERT(p != NULL);
diff --git a/runtime/ctok.c b/runtime/ctok.c
index 18ddaed2..99b0e095 100644
--- a/runtime/ctok.c
+++ b/runtime/ctok.c
@@ -1,4 +1,4 @@
-/* cfgtok.c - helper class to tokenize an input stream - which surprisingly
+/* ctok.c - helper class to tokenize an input stream - which surprisingly
* currently does not work with streams but with string. But that will
* probably change over time ;) This class was originally written to support
* the expression module but may evolve when (if) the expression module is
@@ -267,7 +267,7 @@ ctokGetVar(ctok_t *pThis, ctok_token_t *pToken)
{
DEFiRet;
uchar c;
- cstr_t *pstrVal;
+ cstr_t *pstrVal = NULL;
ISOBJ_TYPE_assert(pThis, ctok);
ASSERT(pToken != NULL);
diff --git a/runtime/debug.c b/runtime/debug.c
index 0ada909b..81b45d41 100644
--- a/runtime/debug.c
+++ b/runtime/debug.c
@@ -435,14 +435,13 @@ dbgMutLog_t *dbgMutLogFindHolder(pthread_mutex_t *pmut)
static inline void dbgMutexPreLockLog(pthread_mutex_t *pmut, dbgFuncDB_t *pFuncDB, int ln)
{
dbgMutLog_t *pHolder;
- dbgMutLog_t *pLog;
char pszBuf[128];
char pszHolderThrdName[64];
char *pszHolder;
pthread_mutex_lock(&mutMutLog);
pHolder = dbgMutLogFindHolder(pmut);
- pLog = dbgMutLogAddEntry(pmut, MUTOP_LOCKWAIT, pFuncDB, ln);
+ dbgMutLogAddEntry(pmut, MUTOP_LOCKWAIT, pFuncDB, ln);
if(pHolder == NULL)
pszHolder = "[NONE]";
@@ -483,14 +482,13 @@ static inline void dbgMutexLockLog(pthread_mutex_t *pmut, dbgFuncDB_t *pFuncDB,
static inline void dbgMutexPreTryLockLog(pthread_mutex_t *pmut, dbgFuncDB_t *pFuncDB, int ln)
{
dbgMutLog_t *pHolder;
- dbgMutLog_t *pLog;
char pszBuf[128];
char pszHolderThrdName[64];
char *pszHolder;
pthread_mutex_lock(&mutMutLog);
pHolder = dbgMutLogFindHolder(pmut);
- pLog = dbgMutLogAddEntry(pmut, MUTOP_TRYLOCK, pFuncDB, ln);
+ dbgMutLogAddEntry(pmut, MUTOP_TRYLOCK, pFuncDB, ln);
if(pHolder == NULL)
pszHolder = "[NONE]";
diff --git a/runtime/msg.c b/runtime/msg.c
index 10c5f82a..c450d6bd 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -1485,7 +1485,7 @@ rsRetVal MsgSetPROCID(msg_t *pMsg, char* pszPROCID)
CHKiRet(cstrConstruct(&pMsg->pCSPROCID));
}
/* if we reach this point, we have the object */
- iRet = rsCStrSetSzStr(pMsg->pCSPROCID, (uchar*) pszPROCID);
+ CHKiRet(rsCStrSetSzStr(pMsg->pCSPROCID, (uchar*) pszPROCID));
CHKiRet(cstrFinalize(pMsg->pCSPROCID));
finalize_it:
@@ -2881,7 +2881,6 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
if(pTpe->data.field.options.bCSV) {
/* we need to obtain a private copy, as we need to at least add the double quotes */
int iBufLen;
- int i;
uchar *pBStart;
uchar *pDst;
uchar *pSrc;
@@ -2896,7 +2895,6 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
RET_OUT_OF_MEMORY;
}
pSrc = pRes;
- i = 0;
*pDst++ = '"'; /* starting quote */
while(*pSrc) {
if(*pSrc == '"')
diff --git a/runtime/parser.c b/runtime/parser.c
index 810bf42b..fdda9546 100644
--- a/runtime/parser.c
+++ b/runtime/parser.c
@@ -272,7 +272,6 @@ rsRetVal parseMsg(msg_t *pMsg)
uchar *msg;
int pri;
int lenMsg;
- int iPriText;
if(pMsg->iLenRawMsg == 0)
ABORT_FINALIZE(RS_RET_EMPTY_MSG);
@@ -286,7 +285,6 @@ rsRetVal parseMsg(msg_t *pMsg)
lenMsg = pMsg->iLenRawMsg;
msg = pMsg->pszRawMsg;
pri = DEFUPRI;
- iPriText = 0;
if(pMsg->msgFlags & NO_PRI_IN_RAW) {
/* In this case, simply do so as if the pri would be right at top */
MsgSetAfterPRIOffs(pMsg, 0);
diff --git a/runtime/queue.c b/runtime/queue.c
index bedefb77..0c9d863f 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -685,7 +685,6 @@ qqueueHaveQIF(qqueue_t *pThis)
{
DEFiRet;
uchar pszQIFNam[MAXFNAME];
- size_t lenQIFNam;
struct stat stat_buf;
ISOBJ_TYPE_assert(pThis, qqueue);
@@ -694,8 +693,8 @@ qqueueHaveQIF(qqueue_t *pThis)
ABORT_FINALIZE(RS_RET_NO_FILEPREFIX);
/* Construct file name */
- lenQIFNam = snprintf((char*)pszQIFNam, sizeof(pszQIFNam) / sizeof(uchar), "%s/%s.qi",
- (char*) glbl.GetWorkDir(), (char*)pThis->pszFilePrefix);
+ snprintf((char*)pszQIFNam, sizeof(pszQIFNam) / sizeof(uchar), "%s/%s.qi",
+ (char*) glbl.GetWorkDir(), (char*)pThis->pszFilePrefix);
/* check if the file exists */
if(stat((char*) pszQIFNam, &stat_buf) == -1) {
diff --git a/runtime/wtp.c b/runtime/wtp.c
index fff37c2f..b4fd2e04 100644
--- a/runtime/wtp.c
+++ b/runtime/wtp.c
@@ -478,7 +478,7 @@ wtpWorker(void *arg) /* the arg is actually a wti object, even though we are in
do {
END_MTX_PROTECTED_OPERATIONS(&pThis->mut);
- iRet = wtiWorker(pWti); /* just to make sure: this is NOT protected by the mutex! */
+ wtiWorker(pWti); /* just to make sure: this is NOT protected by the mutex! */
BEGIN_MTX_PROTECTED_OPERATIONS(&pThis->mut, LOCK_MUTEX);
} while(pThis->iCurNumWrkThrd == 1 && pThis->bInactivityGuard == 1);