diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2000-09-22 22:22:23 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2000-09-22 22:22:23 +0000 |
commit | c8afb95c805b8d29ab352543ec525db553d27eed (patch) | |
tree | 47826359bfa07a090842963fe840ae6f6a312e19 | |
parent | 4acf7265ae1c25d148e035b026ccb24c70e7a421 (diff) |
- move break from loop on EOF in order to make cap_mkdb not ignore the final
record in terminfo mode
- while we're here fix indentation, spelling
okay millert@
-rw-r--r-- | usr.bin/cap_mkdb/cap_mkdb.c | 8 | ||||
-rw-r--r-- | usr.bin/cap_mkdb/getinfo.c | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/cap_mkdb/cap_mkdb.c b/usr.bin/cap_mkdb/cap_mkdb.c index 934a189276e..689230c2197 100644 --- a/usr.bin/cap_mkdb/cap_mkdb.c +++ b/usr.bin/cap_mkdb/cap_mkdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cap_mkdb.c,v 1.5 2000/01/09 01:10:37 millert Exp $ */ +/* $OpenBSD: cap_mkdb.c,v 1.6 2000/09/22 22:22:22 naddy Exp $ */ /* $NetBSD: cap_mkdb.c,v 1.5 1995/09/02 05:47:12 jtc Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)cap_mkdb.c 8.2 (Berkeley) 4/27/95"; #endif -static char rcsid[] = "$OpenBSD: cap_mkdb.c,v 1.5 2000/01/09 01:10:37 millert Exp $"; +static char rcsid[] = "$OpenBSD: cap_mkdb.c,v 1.6 2000/09/22 22:22:22 naddy Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -103,7 +103,7 @@ main(argc, argv) case 'v': verbose = 1; break; - case 'i': + case 'i': info = 1; break; case '?': @@ -155,7 +155,7 @@ dounlink() #define SHADOW (char)2 /* - * db_build() builds the name and capabilty databases according to the + * db_build() builds the name and capability databases according to the * details above. */ void diff --git a/usr.bin/cap_mkdb/getinfo.c b/usr.bin/cap_mkdb/getinfo.c index 9214525f694..1245027065a 100644 --- a/usr.bin/cap_mkdb/getinfo.c +++ b/usr.bin/cap_mkdb/getinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getinfo.c,v 1.1 1999/03/05 04:47:45 tholo Exp $ */ +/* $OpenBSD: getinfo.c,v 1.2 2000/09/22 22:22:22 naddy Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: getinfo.c,v 1.1 1999/03/05 04:47:45 tholo Exp $"; +static char rcsid[] = "$OpenBSD: getinfo.c,v 1.2 2000/09/22 22:22:22 naddy Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -288,12 +288,6 @@ getent(cap, len, db_array, fd, name, depth) } /* loop invariant let's us do this */ *rp++ = '\0'; - - /* - * If encountered eof check next file. - */ - if (eof) - break; /* * Toss blank lines and comments. @@ -308,6 +302,12 @@ getent(cap, len, db_array, fd, name, depth) foundit = 1; break; /* found it! */ } + + /* + * If encountered eof check next file. + */ + if (eof) + break; } } if (foundit) |