mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-20 06:10:42 +01:00
Merge pull request #2064 from rgerhards/coverity-false-positives
"fix" Coverity false positives
This commit is contained in:
commit
cf22e85c59
@ -4768,10 +4768,7 @@ rmLeadingSpace(char *s)
|
||||
rsRetVal
|
||||
initRainerscript(void)
|
||||
{
|
||||
DEFiRet;
|
||||
CHKiRet(objGetObjInterface(&obj));
|
||||
finalize_it:
|
||||
RETiRet;
|
||||
return objGetObjInterface(&obj);
|
||||
}
|
||||
|
||||
/* we need a function to check for octal digits */
|
||||
|
||||
@ -247,8 +247,7 @@ doInjectNumericSuffixMsg(int iNum, ratelimit_t *ratelimiter)
|
||||
DEFiRet;
|
||||
snprintf((char*)szMsg, sizeof(szMsg)/sizeof(uchar),
|
||||
"<167>Mar 1 01:00:00 172.20.245.8 tag msgnum:%8.8d:", iNum);
|
||||
CHKiRet(doInjectMsg(szMsg, ratelimiter));
|
||||
finalize_it:
|
||||
iRet = doInjectMsg(szMsg, ratelimiter);
|
||||
RETiRet;
|
||||
}
|
||||
|
||||
|
||||
@ -554,7 +554,7 @@ CODESTARTnewInpInst
|
||||
inst->topic,
|
||||
inst->consumergroup);
|
||||
|
||||
CHKiRet(checkInstance(inst));
|
||||
iRet = checkInstance(inst);
|
||||
finalize_it:
|
||||
CODE_STD_FINALIZERnewInpInst
|
||||
cnfparamvalsDestruct(pvals, &inppblk);
|
||||
|
||||
@ -638,7 +638,7 @@ CODESTARTactivateCnfPrePrivDrop
|
||||
}
|
||||
if(pOurTcpsrv == NULL)
|
||||
ABORT_FINALIZE(RS_RET_NO_RUN);
|
||||
CHKiRet(tcpsrv.ConstructFinalize(pOurTcpsrv));
|
||||
iRet = tcpsrv.ConstructFinalize(pOurTcpsrv);
|
||||
finalize_it:
|
||||
ENDactivateCnfPrePrivDrop
|
||||
|
||||
|
||||
@ -692,7 +692,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
|
||||
"mmexternal supports only v6+ config format, use: "
|
||||
"action(type=\"mmexternal\" binary=...)");
|
||||
}
|
||||
ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED);
|
||||
iRet = RS_RET_CONFLINE_UNPROCESSED;
|
||||
CODE_STD_FINALIZERparseSelectorAct
|
||||
ENDparseSelectorAct
|
||||
|
||||
@ -701,8 +701,7 @@ BEGINmodExit
|
||||
CODESTARTmodExit
|
||||
free(cs.szBinary);
|
||||
cs.szBinary = NULL;
|
||||
CHKiRet(objRelease(errmsg, CORE_COMPONENT));
|
||||
finalize_it:
|
||||
iRet = objRelease(errmsg, CORE_COMPONENT);
|
||||
ENDmodExit
|
||||
|
||||
|
||||
|
||||
@ -188,5 +188,5 @@ CODESTARTmodInit
|
||||
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
|
||||
CODEmodInit_QueryRegCFSLineHdlr
|
||||
DBGPRINTF("mmrm1stspace: module compiled with rsyslog version %s.\n", VERSION);
|
||||
CHKiRet(objUse(errmsg, CORE_COMPONENT));
|
||||
iRet = objUse(errmsg, CORE_COMPONENT);
|
||||
ENDmodInit
|
||||
|
||||
@ -738,8 +738,7 @@ CODESTARTcreateWrkrInstance
|
||||
pWrkrData->fdOutputFile = -1;
|
||||
pWrkrData->bIsRunning = 0;
|
||||
|
||||
CHKiRet(startChild(pWrkrData));
|
||||
finalize_it:
|
||||
iRet = startChild(pWrkrData);
|
||||
ENDcreateWrkrInstance
|
||||
|
||||
|
||||
|
||||
@ -1220,6 +1220,10 @@ glblDoneLoadCnf(void)
|
||||
} else if(!strcmp(paramblk.descr[i].name, "debug.logfile")) {
|
||||
if(pszAltDbgFileName == NULL) {
|
||||
pszAltDbgFileName = es_str2cstr(cnfparamvals[i].val.d.estr, NULL);
|
||||
/* can actually happen if debug system also opened altdbg */
|
||||
if(altdbg != -1) {
|
||||
close(altdbg);
|
||||
}
|
||||
if((altdbg = open(pszAltDbgFileName, O_WRONLY|O_CREAT|O_TRUNC|O_NOCTTY
|
||||
|O_CLOEXEC, S_IRUSR|S_IWUSR)) == -1) {
|
||||
errmsg.LogError(0, RS_RET_ERR, "debug log file '%s' could not be opened",
|
||||
|
||||
@ -63,7 +63,6 @@ ENDobjConstruct(netstrm)
|
||||
/* destructor for the netstrm object */
|
||||
BEGINobjDestruct(netstrm) /* be sure to specify the object type also in END and CODESTART macros! */
|
||||
CODESTARTobjDestruct(netstrm)
|
||||
//printf("destruct driver data %p\n", pThis->pDrvrData);
|
||||
if(pThis->pDrvrData != NULL)
|
||||
iRet = pThis->Drvr.Destruct(&pThis->pDrvrData);
|
||||
ENDobjDestruct(netstrm)
|
||||
@ -73,11 +72,8 @@ ENDobjDestruct(netstrm)
|
||||
static rsRetVal
|
||||
netstrmConstructFinalize(netstrm_t *pThis)
|
||||
{
|
||||
DEFiRet;
|
||||
ISOBJ_TYPE_assert(pThis, netstrm);
|
||||
CHKiRet(pThis->Drvr.Construct(&pThis->pDrvrData));
|
||||
finalize_it:
|
||||
RETiRet;
|
||||
return pThis->Drvr.Construct(&pThis->pDrvrData);
|
||||
}
|
||||
|
||||
/* abort a connection. This is much like Destruct(), but tries
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user