diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/modules.c | 8 | ||||
-rw-r--r-- | runtime/parser.c | 20 | ||||
-rw-r--r-- | runtime/srutils.c | 8 | ||||
-rw-r--r-- | runtime/stream.c | 4 | ||||
-rw-r--r-- | runtime/syslogd-types.h | 5 | ||||
-rw-r--r-- | runtime/wti.c | 4 | ||||
-rw-r--r-- | runtime/wtp.h | 4 |
7 files changed, 26 insertions, 27 deletions
diff --git a/runtime/modules.c b/runtime/modules.c index b353e983..45788ef7 100644 --- a/runtime/modules.c +++ b/runtime/modules.c @@ -498,11 +498,11 @@ doModInit(rsRetVal (*modInit)(int, int*, rsRetVal(**)(), rsRetVal(*)(), modInfo_ /* check some features */ localRet = pNew->isCompatibleWithFeature(sFEATUREAutomaticSanitazion); if(localRet == RS_RET_OK){ - CHKiRet(parser.SetDoSanitazion(pParser, TRUE)); + CHKiRet(parser.SetDoSanitazion(pParser, RSTRUE)); } localRet = pNew->isCompatibleWithFeature(sFEATUREAutomaticPRIParsing); if(localRet == RS_RET_OK){ - CHKiRet(parser.SetDoPRIParsing(pParser, TRUE)); + CHKiRet(parser.SetDoPRIParsing(pParser, RSTRUE)); } CHKiRet(parser.SetName(pParser, pName)); @@ -787,9 +787,9 @@ Load(uchar *pModName) if(iModNameLen > 3 && !strcmp((char *) pModName + iModNameLen - 3, ".so")) { iModNameLen -= 3; - bHasExtension = TRUE; + bHasExtension = RSTRUE; } else - bHasExtension = FALSE; + bHasExtension = RSFALSE; pModInfo = GetNxt(NULL); while(pModInfo != NULL) { diff --git a/runtime/parser.c b/runtime/parser.c index 300db1e0..180814cf 100644 --- a/runtime/parser.c +++ b/runtime/parser.c @@ -311,7 +311,7 @@ SanitizeMsg(msg_t *pMsg) size_t iDst; size_t iMaxLine; size_t maxDest; - sbool bUpdatedLen = FALSE; + sbool bUpdatedLen = RSFALSE; uchar szSanBuf[32*1024]; /* buffer used for sanitizing a string */ assert(pMsg != NULL); @@ -326,7 +326,7 @@ SanitizeMsg(msg_t *pMsg) */ if(pszMsg[lenMsg-1] == '\0') { DBGPRINTF("dropped NUL at very end of message\n"); - bUpdatedLen = TRUE; + bUpdatedLen = RSTRUE; lenMsg--; } @@ -339,7 +339,7 @@ SanitizeMsg(msg_t *pMsg) DBGPRINTF("dropped LF at very end of message (DropTrailingLF is set)\n"); lenMsg--; pszMsg[lenMsg] = '\0'; - bUpdatedLen = TRUE; + bUpdatedLen = RSTRUE; } /* it is much quicker to sweep over the message and see if it actually @@ -370,7 +370,7 @@ SanitizeMsg(msg_t *pMsg) } if(!bNeedSanitize) { - if(bUpdatedLen == TRUE) + if(bUpdatedLen == RSTRUE) MsgSetRawMsgSize(pMsg, lenMsg); FINALIZE; } @@ -508,17 +508,17 @@ ParseMsg(msg_t *pMsg) DBGPRINTF("parse using parser list %p%s.\n", pParserList, (pParserList == pDfltParsLst) ? " (the default list)" : ""); - bIsSanitized = FALSE; - bPRIisParsed = FALSE; + bIsSanitized = RSFALSE; + bPRIisParsed = RSFALSE; while(pParserList != NULL) { pParser = pParserList->pParser; - if(pParser->bDoSanitazion && bIsSanitized == FALSE) { + if(pParser->bDoSanitazion && bIsSanitized == RSFALSE) { CHKiRet(SanitizeMsg(pMsg)); - if(pParser->bDoPRIParsing && bPRIisParsed == FALSE) { + if(pParser->bDoPRIParsing && bPRIisParsed == RSFALSE) { CHKiRet(ParsePRI(pMsg)); - bPRIisParsed = TRUE; + bPRIisParsed = RSTRUE; } - bIsSanitized = TRUE; + bIsSanitized = RSTRUE; } localRet = pParser->pModule->mod.pm.parse(pMsg); dbgprintf("Parser '%s' returned %d\n", pParser->pName, localRet); diff --git a/runtime/srutils.c b/runtime/srutils.c index a473c83e..f420c0f7 100644 --- a/runtime/srutils.c +++ b/runtime/srutils.c @@ -41,8 +41,6 @@ #include <assert.h> #include <sys/wait.h> #include <ctype.h> -#define TRUE 1 -#define FALSE 0 #include "srUtils.h" #include "obj.h" @@ -128,11 +126,11 @@ rsRetVal srUtilItoA(char *pBuf, int iLenBuf, number_t iToConv) if(iToConv < 0) { - bIsNegative = TRUE; + bIsNegative = RSTRUE; iToConv *= -1; } else - bIsNegative = FALSE; + bIsNegative = RSFALSE; /* first generate a string with the digits in the reverse direction */ i = 0; @@ -148,7 +146,7 @@ rsRetVal srUtilItoA(char *pBuf, int iLenBuf, number_t iToConv) return RS_RET_PROVIDED_BUFFER_TOO_SMALL; /* then move it to the right direction... */ - if(bIsNegative == TRUE) + if(bIsNegative == RSTRUE) *pBuf++ = '-'; while(i >= 0) *pBuf++ = szBuf[i--]; diff --git a/runtime/stream.c b/runtime/stream.c index 6b88d3f4..9645a3fe 100644 --- a/runtime/stream.c +++ b/runtime/stream.c @@ -1172,7 +1172,7 @@ doZipWrite(strm_t *pThis, uchar *pBuf, size_t lenBuf) { z_stream zstrm; int zRet; /* zlib return state */ - sbool bzInitDone = FALSE; + sbool bzInitDone = RSFALSE; DEFiRet; assert(pThis != NULL); assert(pBuf != NULL); @@ -1188,7 +1188,7 @@ doZipWrite(strm_t *pThis, uchar *pBuf, size_t lenBuf) DBGPRINTF("error %d returned from zlib/deflateInit2()\n", zRet); ABORT_FINALIZE(RS_RET_ZLIB_ERR); } - bzInitDone = TRUE; + bzInitDone = RSTRUE; /* now doing the compression */ zstrm.next_in = (Bytef*) pBuf; /* as of zlib doc, this must be set BEFORE DeflateInit2 */ diff --git a/runtime/syslogd-types.h b/runtime/syslogd-types.h index 30ce896a..6947a110 100644 --- a/runtime/syslogd-types.h +++ b/runtime/syslogd-types.h @@ -31,8 +31,9 @@ #include <syslog.h> #endif -#define FALSE 0 -#define TRUE 1 +/* we use RSTRUE/FALSE to prevent name claches with other packages */ +#define RSFALSE 0 +#define RSTRUE 1 #ifdef UT_NAMESIZE # define UNAMESZ UT_NAMESIZE /* length of a login name */ diff --git a/runtime/wti.c b/runtime/wti.c index e44086af..7b88c3eb 100644 --- a/runtime/wti.c +++ b/runtime/wti.c @@ -86,7 +86,7 @@ rsRetVal wtiSetAlwaysRunning(wti_t *pThis) { ISOBJ_TYPE_assert(pThis, wti); - pThis->bAlwaysRunning = TRUE; + pThis->bAlwaysRunning = RSTRUE; return RS_RET_OK; } @@ -198,7 +198,7 @@ wtiConstructFinalize(wti_t *pThis) dbgprintf("%s: finalizing construction of worker instance data\n", wtiGetDbgHdr(pThis)); /* initialize our thread instance descriptor (no concurrency here) */ - pThis->bIsRunning = FALSE; + pThis->bIsRunning = RSFALSE; /* we now alloc the array for user pointers. We obtain the max from the queue itself. */ CHKiRet(pThis->pWtp->pfGetDeqBatchSize(pThis->pWtp->pUsr, &iDeqBatchSize)); diff --git a/runtime/wtp.h b/runtime/wtp.h index 7e24ec82..25992f7f 100644 --- a/runtime/wtp.h +++ b/runtime/wtp.h @@ -27,8 +27,8 @@ #include "atomic.h" /* states for worker threads. */ -#define WRKTHRD_STOPPED FALSE -#define WRKTHRD_RUNNING TRUE +#define WRKTHRD_STOPPED RSFALSE +#define WRKTHRD_RUNNING RSTRUE /* possible states of a worker thread pool */ |