summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-12-16 13:59:16 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-12-16 13:59:16 +0100
commit189a26c0444178612bf6e4618ccd9c722b83c261 (patch)
tree243d27b68a14ebcd2c7263a3492ace23542c5f13 /runtime
parentc5611012f9d82155d6017435b5cf52c0b4e31149 (diff)
parent371a8eec29fa25bbf58f4b1f0d7e3bf4c3ad6329 (diff)
downloadrsyslog-189a26c0444178612bf6e4618ccd9c722b83c261.tar.gz
rsyslog-189a26c0444178612bf6e4618ccd9c722b83c261.tar.xz
rsyslog-189a26c0444178612bf6e4618ccd9c722b83c261.zip
Merge branch 'v4-stable' into v5-stable
Conflicts: ChangeLog runtime/parser.c runtime/queue.c runtime/wtp.c template.c threads.c tools/syslogd.c
Diffstat (limited to 'runtime')
-rw-r--r--runtime/cfsysline.c4
-rw-r--r--runtime/ctok.c2
-rw-r--r--runtime/debug.c6
-rw-r--r--runtime/msg.c4
-rw-r--r--runtime/parser.c2
5 files changed, 6 insertions, 12 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/ctok.c b/runtime/ctok.c
index a17d0ec9..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
diff --git a/runtime/debug.c b/runtime/debug.c
index 64e251e5..c69a0296 100644
--- a/runtime/debug.c
+++ b/runtime/debug.c
@@ -438,14 +438,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]";
@@ -486,14 +485,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 82565f18..e8be79db 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -1546,7 +1546,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:
@@ -2976,7 +2976,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;
@@ -2991,7 +2990,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 40374ae1..d3644976 100644
--- a/runtime/parser.c
+++ b/runtime/parser.c
@@ -429,14 +429,12 @@ ParsePRI(msg_t *pMsg)
int pri;
uchar *msg;
int lenMsg;
- int iPriText;
DEFiRet;
/* pull PRI */
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);