MFC: Avoid changing line while processing syslog prios.

This commit is contained in:
dwmalone 2006-08-18 15:54:13 +00:00
parent 0b38d9751d
commit 0e88827d5b

View File

@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <sys/msgbuf.h>
#include <sys/sysctl.h>
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
@ -177,7 +178,7 @@ main(int argc, char *argv[])
nextp++;
/* Skip ^<[0-9]+> syslog sequences. */
if (*p == '<') {
if (*p == '<' && isdigit(*(p+1))) {
errno = 0;
pri = strtol(p + 1, &q, 10);
if (*q == '>' && pri >= 0 && pri < INT_MAX &&