diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-17 12:56:58 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-17 12:56:58 +0200 |
commit | 56e462610db0dc71cfc2e4af17d1eb27bd67fae7 (patch) | |
tree | 21ad9eb469ca03afa111d1b37bc0a78610e5513d /runtime/parser.c | |
parent | 1e30f67584ca0770e1e5b88ea75da7f9bc1022df (diff) | |
download | rsyslog-56e462610db0dc71cfc2e4af17d1eb27bd67fae7.tar.gz rsyslog-56e462610db0dc71cfc2e4af17d1eb27bd67fae7.tar.xz rsyslog-56e462610db0dc71cfc2e4af17d1eb27bd67fae7.zip |
further optimized message object
pri, facility and severity string generation simplified
Diffstat (limited to 'runtime/parser.c')
-rw-r--r-- | runtime/parser.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/runtime/parser.c b/runtime/parser.c index 0b45bfd5..c13edb8f 100644 --- a/runtime/parser.c +++ b/runtime/parser.c @@ -284,7 +284,6 @@ rsRetVal parseMsg(msg_t *pMsg) DEFiRet; uchar *msg; int pri; - int iPriText; CHKiRet(sanitizeMessage(pMsg)); @@ -294,7 +293,6 @@ rsRetVal parseMsg(msg_t *pMsg) /* pull PRI */ pri = DEFUPRI; msg = pMsg->pszRawMsg; - iPriText = 0; if(*msg == '<') { /* while we process the PRI, we also fill the PRI textual representation * inside the msg object. This may not be ideal from an OOP point of view, @@ -302,11 +300,8 @@ rsRetVal parseMsg(msg_t *pMsg) */ pri = 0; while(isdigit((int) *++msg)) { - pMsg->bufPRI[iPriText++ % 4] = *msg; /* mod 4 to guard against malformed messages! */ pri = 10 * pri + (*msg - '0'); } - pMsg->bufPRI[iPriText % 4] = '\0'; - pMsg->iLenPRI = iPriText % 4; if(*msg == '>') ++msg; if(pri & ~(LOG_FACMASK|LOG_PRIMASK)) |