[print-syslog.c:98]: (style) Array index 'msg_off' is used before limits
check.
Even though this is a false positive in this specific case, let's not
have it around, this will make it less likely missing a real one.
if (*(pptr+msg_off) == '<') {
msg_off++;
ND_TCHECK2(*(pptr + msg_off), 1);
- while ( *(pptr+msg_off) >= '0' &&
- *(pptr+msg_off) <= '9' &&
- msg_off <= SYSLOG_MAX_DIGITS) {
+ while (msg_off <= SYSLOG_MAX_DIGITS &&
+ *(pptr+msg_off) >= '0' &&
+ *(pptr+msg_off) <= '9') {
pri = pri * 10 + (*(pptr+msg_off) - '0');
msg_off++;
ND_TCHECK2(*(pptr + msg_off), 1);