diff options
author | 2006-03-18 03:55:09 +0000 | |
---|---|---|
committer | 2006-03-18 03:55:09 +0000 | |
commit | 825e7f18823c99467c3517cfd0900198dc4b14ca (patch) | |
tree | 764e7177497f2c74ad7df7585392bfb3377c66a0 | |
parent | strdup() -> xstrdup() (diff) | |
download | wireguard-openbsd-825e7f18823c99467c3517cfd0900198dc4b14ca.tar.xz wireguard-openbsd-825e7f18823c99467c3517cfd0900198dc4b14ca.zip |
In all these cases pfp != NULL. I also sneaked in some KNF.
Okay jaredy, millert@, and otto@
-rw-r--r-- | lib/libc/gen/getcap.c | 8 | ||||
-rw-r--r-- | usr.bin/cap_mkdb/getinfo.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c index c3cd3bcd238..3ef6b0d5f03 100644 --- a/lib/libc/gen/getcap.c +++ b/lib/libc/gen/getcap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getcap.c,v 1.24 2006/03/10 05:26:55 ray Exp $ */ +/* $OpenBSD: getcap.c,v 1.25 2006/03/18 03:55:09 ray Exp $ */ /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -669,13 +669,13 @@ cgetnext(char **bp, char **db_array) (void)cgetclose(); return (-1); } - for(;;) { + for (;;) { if (toprec && !gottoprec) { gottoprec = 1; line = toprec; } else { line = fgetln(pfp, &len); - if (line == NULL && pfp) { + if (line == NULL) { if (ferror(pfp)) { (void)cgetclose(); return (-1); @@ -742,7 +742,7 @@ cgetnext(char **bp, char **db_array) break; } else { /* name field extends beyond the line */ line = fgetln(pfp, &len); - if (line == NULL && pfp) { + if (line == NULL) { if (ferror(pfp)) { (void)cgetclose(); return (-1); diff --git a/usr.bin/cap_mkdb/getinfo.c b/usr.bin/cap_mkdb/getinfo.c index 059c92f94b4..f907106ac63 100644 --- a/usr.bin/cap_mkdb/getinfo.c +++ b/usr.bin/cap_mkdb/getinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getinfo.c,v 1.9 2006/03/10 05:20:35 ray Exp $ */ +/* $OpenBSD: getinfo.c,v 1.10 2006/03/18 03:55:09 ray Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -30,7 +30,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: getinfo.c,v 1.9 2006/03/10 05:20:35 ray Exp $"; +static char rcsid[] = "$OpenBSD: getinfo.c,v 1.10 2006/03/18 03:55:09 ray Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -532,9 +532,9 @@ igetnext(char **bp, char **db_array) (void)igetclose(); return (-1); } - for(;;) { + for (;;) { line = fgetln(pfp, &len); - if (line == NULL && pfp) { + if (line == NULL) { if (ferror(pfp)) { (void)igetclose(); return (-1); @@ -589,7 +589,7 @@ igetnext(char **bp, char **db_array) break; } else { /* name field extends beyond the line */ line = fgetln(pfp, &len); - if (line == NULL && pfp) { + if (line == NULL) { if (ferror(pfp)) { (void)igetclose(); return (-1); |