X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/a6b37187a520e8e9c034303ace1a7fe8e05175f6..463dee20b1c83bde113460f9e323ab6e9e9c3de1:/usr/src/lib/libc/net/getprotoent.c diff --git a/usr/src/lib/libc/net/getprotoent.c b/usr/src/lib/libc/net/getprotoent.c index 7385539f98..318ed30b89 100644 --- a/usr/src/lib/libc/net/getprotoent.c +++ b/usr/src/lib/libc/net/getprotoent.c @@ -1,4 +1,4 @@ -/* getprotoent.c 4.4 82/12/17 */ +/* getprotoent.c 4.5 83/01/02 */ #include #include @@ -64,7 +64,7 @@ again: q = proto.p_aliases = proto_aliases; if (p != NULL) { cp = p; - while (*cp) { + while (cp && *cp) { if (*cp == ' ' || *cp == '\t') { cp++; continue; @@ -72,7 +72,7 @@ again: if (q < &proto_aliases[MAXALIASES - 1]) *q++ = cp; cp = any(cp, " \t"); - if (*cp != NULL) + if (cp != NULL) *cp++ = '\0'; } }