use string.h
authorJohn Kohl <jtkohl@mit.edu>
Mon, 29 Oct 1990 14:19:38 +0000 (14:19 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Mon, 29 Oct 1990 14:19:38 +0000 (14:19 +0000)
and strchr

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1360 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/posix/syslog.c

index 2d8276d87aa0350d1b7d40bfb7259368287e47d4..5f30fc47f4036d27a9c1f00a708d9c36b2b5b7a5 100644 (file)
@@ -49,7 +49,7 @@ static char sccsid[] = "@(#)syslog.c  5.20 (Berkeley) 1/19/89";
 #include <sys/syslog.h>
 #include <sys/wait.h>
 #include <netdb.h>
-#include <strings.h>
+#include <string.h>
 #include <stdio.h>
 
 #define        LOGNAME "/dev/log"
@@ -164,7 +164,7 @@ vsyslog(pri, fmt, ap)
                        return;
                (void)alarm((u_int)0);
                (void)strcat(tbuf, "\r");
-               p = index(tbuf, '>') + 1;
+               p = strchr(tbuf, '>') + 1;
                (void)write(fd, p, cnt + 1 - (p - tbuf));
                (void)close(fd);
                _exit(0);