projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
null pointer stuff from sun
[unix-history]
/
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
7385539
..
318ed30
100644
(file)
--- 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 <stdio.h>
#include <sys/socket.h>
#include <stdio.h>
#include <sys/socket.h>
@@
-64,7
+64,7
@@
again:
q = proto.p_aliases = proto_aliases;
if (p != NULL) {
cp = p;
q = proto.p_aliases = proto_aliases;
if (p != NULL) {
cp = p;
- while (*cp) {
+ while (
cp &&
*cp) {
if (*cp == ' ' || *cp == '\t') {
cp++;
continue;
if (*cp == ' ' || *cp == '\t') {
cp++;
continue;
@@
-72,7
+72,7
@@
again:
if (q < &proto_aliases[MAXALIASES - 1])
*q++ = cp;
cp = any(cp, " \t");
if (q < &proto_aliases[MAXALIASES - 1])
*q++ = cp;
cp = any(cp, " \t");
- if (
*
cp != NULL)
+ if (cp != NULL)
*cp++ = '\0';
}
}
*cp++ = '\0';
}
}