mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-20 14:20:42 +01:00
added macro to consistently define iRet
This commit is contained in:
parent
e123f620d3
commit
9c20d0b4b4
@ -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);
|
||||
|
||||
4
omfile.c
4
omfile.c
@ -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)
|
||||
|
||||
10
syslogd.c
10
syslogd.c
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user