summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2006-03-18 03:55:10 +0000
committerRay Lai <ray@cvs.openbsd.org>2006-03-18 03:55:10 +0000
commitef426407b28b180a9589225beb7b3be12606730e (patch)
treecbdcf9f6acd37cc1a102fbdf8d7dd305dc22cda6
parentfc9194b1dc204173f974a11cadd48f1f58b36603 (diff)
In all these cases pfp != NULL. I also sneaked in some KNF.
Okay jaredy, millert@, and otto@
-rw-r--r--lib/libc/gen/getcap.c8
-rw-r--r--usr.bin/cap_mkdb/getinfo.c10
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);