diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-31 08:15:40 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-07-31 08:15:40 +0000 |
commit | 9c20d0b4b4d3b85128d1754af3324866b135a412 (patch) | |
tree | 2a851c42a1147844efe56691e9d33116b9c856f3 | |
parent | e123f620d3705263777c279ba319acf83eaf928d (diff) | |
download | rsyslog-9c20d0b4b4d3b85128d1754af3324866b135a412.tar.gz rsyslog-9c20d0b4b4d3b85128d1754af3324866b135a412.tar.xz rsyslog-9c20d0b4b4d3b85128d1754af3324866b135a412.zip |
added macro to consistently define iRet
-rw-r--r-- | module-template.h | 14 | ||||
-rw-r--r-- | objomsr.c | 2 | ||||
-rw-r--r-- | omfile.c | 4 | ||||
-rw-r--r-- | ommysql.c | 4 | ||||
-rw-r--r-- | syslogd.c | 10 |
5 files changed, 17 insertions, 17 deletions
diff --git a/module-template.h b/module-template.h index b3c3229c..a8de8263 100644 --- a/module-template.h +++ b/module-template.h @@ -43,7 +43,7 @@ #define BEGINcreateInstance \ static rsRetVal createInstance(instanceData **ppData)\ {\ - rsRetVal iRet = RS_RET_OK; /* store error code here */\ + DEFiRet; /* store error code here */\ instanceData *pData; /* use this to point to data elements */ #define CODESTARTcreateInstance \ @@ -62,7 +62,7 @@ static rsRetVal createInstance(instanceData **ppData)\ #define BEGINfreeInstance \ static rsRetVal freeInstance(void* pModData)\ {\ - rsRetVal iRet = RS_RET_OK;\ + DEFiRet;\ instanceData *pData; #define CODESTARTfreeInstance \ @@ -92,7 +92,7 @@ static rsRetVal isCompatibleWithFeature(syslogFeature __attribute__((unused)) eF #define BEGINdoAction \ static rsRetVal doAction(uchar __attribute__((unused)) **ppString, unsigned __attribute__((unused)) iMsgOpts, instanceData __attribute__((unused)) *pData)\ {\ - rsRetVal iRet = RS_RET_OK; + DEFiRet; #define CODESTARTdoAction \ assert(ppString != NULL); @@ -109,7 +109,7 @@ static rsRetVal doAction(uchar __attribute__((unused)) **ppString, unsigned __at #define BEGINdbgPrintInstInfo \ static rsRetVal dbgPrintInstInfo(void *pModData)\ {\ - rsRetVal iRet = RS_RET_OK;\ + DEFiRet;\ instanceData *pData = NULL; #define CODESTARTdbgPrintInstInfo \ @@ -201,7 +201,7 @@ static rsRetVal getWriteFDForSelect(void *pModData, short *fd)\ #define BEGINparseSelectorAct \ static rsRetVal parseSelectorAct(uchar **pp, void **ppModData, omodStringRequest_t **ppOMSR)\ {\ - rsRetVal iRet = RS_RET_OK;\ + DEFiRet;\ uchar *p;\ instanceData *pData = NULL; @@ -235,7 +235,7 @@ do_abort:\ #define BEGINqueryEtryPt \ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\ {\ - rsRetVal iRet = RS_RET_OK; + DEFiRet; #define CODESTARTqueryEtryPt \ if((name == NULL) || (pEtryPoint == NULL))\ @@ -289,7 +289,7 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\ #define BEGINmodInit(uniqName) \ rsRetVal modInit##uniqName(int iIFVersRequested __attribute__((unused)), int *ipIFVersProvided, rsRetVal (**pQueryEtryPt)())\ {\ - rsRetVal iRet = RS_RET_OK; + DEFiRet; #define CODESTARTmodInit \ if((pQueryEtryPt == NULL) || (ipIFVersProvided == NULL))\ @@ -61,7 +61,7 @@ rsRetVal OMSRdestruct(omodStringRequest_t *pThis) rsRetVal OMSRconstruct(omodStringRequest_t **ppThis, int iNumEntries) { omodStringRequest_t *pThis; - rsRetVal iRet = RS_RET_OK; + DEFiRet; assert(ppThis != NULL); assert(iNumEntries > 0); @@ -127,7 +127,7 @@ ENDdbgPrintInstInfo */ static rsRetVal cflineParseOutchannel(instanceData *pData, uchar* p, omodStringRequest_t *pOMSR, int iEntry, int iTplOpts) { - rsRetVal iRet = RS_RET_OK; + DEFiRet; size_t i; struct outchannel *pOch; char szBuf[128]; /* should be more than sufficient */ @@ -447,7 +447,7 @@ static int prepareDynFile(instanceData *pData, uchar *newFileName, unsigned iMsg static rsRetVal writeFile(uchar **ppString, unsigned iMsgOpts, instanceData *pData) { off_t actualFileSize; - rsRetVal iRet = RS_RET_OK; + DEFiRet; assert(pData != NULL); @@ -235,7 +235,7 @@ rsRetVal checkDBErrorState(instanceData *pData) static rsRetVal initMySQL(instanceData *pData) { int iCounter = 0; - rsRetVal iRet = RS_RET_OK; + DEFiRet; assert(pData != NULL); if((iRet = checkDBErrorState(pData)) != RS_RET_OK) @@ -289,7 +289,7 @@ static rsRetVal reInitMySQL(instanceData *pData) rsRetVal writeMySQL(uchar *psz, instanceData *pData) { int iCounter=0; - rsRetVal iRet = RS_RET_OK; + DEFiRet; assert(pData != NULL); if((iRet = checkDBErrorState(pData)) != RS_RET_OK) @@ -763,7 +763,7 @@ static void clearAllowedSenders (struct AllowedSenders *pAllow) { static rsRetVal AddAllowedSender(struct AllowedSenders **ppRoot, struct AllowedSenders **ppLast, struct NetAddr *iAllow, uint8_t iSignificantBits) { - rsRetVal iRet = RS_RET_OK; + DEFiRet; assert(ppRoot != NULL); assert(ppLast != NULL); @@ -3058,7 +3058,7 @@ rsRetVal fprintlog(register selector_t *f) msg_t *pMsgSave; /* to save current message pointer, necessary to restore it in case it needs to be updated (e.g. repeated msgs) */ pMsgSave = NULL; /* indicate message poiner not saved */ - rsRetVal iRet = RS_RET_OK; + DEFiRet; int i; /* first check if this is a regular message or the repeation of @@ -4040,7 +4040,7 @@ rsRetVal cflineParseTemplateName(uchar** pp, omodStringRequest_t *pOMSR, int iEn { uchar *p; uchar *tplName; - rsRetVal iRet = RS_RET_OK; + DEFiRet; rsCStrObj *pStrB; assert(pp != NULL); @@ -4105,7 +4105,7 @@ rsRetVal cflineParseFileName(uchar* p, uchar *pFileName, omodStringRequest_t *pO { register uchar *pName; int i; - rsRetVal iRet = RS_RET_OK; + DEFiRet; assert(pOMSR != NULL); @@ -4490,7 +4490,7 @@ static rsRetVal cflineProcessTagSelector(uchar **pline) */ rsRetVal addAction(selector_t *f, modInfo_t *pMod, void *pModData, omodStringRequest_t *pOMSR) { - rsRetVal iRet = RS_RET_OK; + DEFiRet; int i; int iTplOpts; uchar *pTplName; |