Revert r325558 as it is incorrect.

This commit is contained in:
Gleb Smirnoff 2017-11-28 19:25:01 +00:00
parent 09f876612c
commit eb7ec39704
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326339

View File

@ -1035,7 +1035,7 @@ static void
logmsg(int pri, const char *msg, const char *from, int flags)
{
struct filed *f;
int i, j, fac, msglen, prilev;
int i, fac, msglen, prilev;
const char *timestamp;
char prog[NAME_MAX+1];
char buf[MAXLINE+1];
@ -1078,19 +1078,6 @@ logmsg(int pri, const char *msg, const char *from, int flags)
prilev = LOG_PRI(pri);
/* skip hostname, see RFC 3164 */
for (i = 0, j = 0; i < NAME_MAX; i++) {
if (isspace(msg[i])) {
j = i + 1;
}
if (msg[i] == ':')
break;
}
if (j <= msglen) {
msg += j;
msglen -= j;
}
/* extract program name */
for (i = 0; i < NAME_MAX; i++) {
if (!isprint(msg[i]) || msg[i] == ':' || msg[i] == '[' ||