diff options
Diffstat (limited to 'lib/libc/gen/getnetgrent.c')
-rw-r--r-- | lib/libc/gen/getnetgrent.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/gen/getnetgrent.c b/lib/libc/gen/getnetgrent.c index 46cc764..662958a 100644 --- a/lib/libc/gen/getnetgrent.c +++ b/lib/libc/gen/getnetgrent.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)getnetgrent.c 8.1 (Berkeley) 6/4/93"; +static char sccsid[] = "@(#)getnetgrent.c 8.2 (Berkeley) 4/27/95"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> @@ -483,10 +483,10 @@ parse_netgrp(group) if (parse_netgrp(spos)) continue; } - /* Watch for null pointer dereferences, dammit! */ - if (pos != NULL) - while (*pos == ' ' || *pos == ',' || *pos == '\t') - pos++; + if (pos == NULL) + break; + while (*pos == ' ' || *pos == ',' || *pos == '\t') + pos++; } return (0); } |