From b8aaa8bec8414f8e55cf9b61fe0873d242c773b8 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 10 Jun 2003 22:20:55 +0000 Subject: mostly ansi cleanup; pval ok --- usr.bin/cap_mkdb/cap_mkdb.c | 15 ++++++--------- usr.bin/cap_mkdb/getinfo.c | 22 +++++++--------------- 2 files changed, 13 insertions(+), 24 deletions(-) (limited to 'usr.bin/cap_mkdb') diff --git a/usr.bin/cap_mkdb/cap_mkdb.c b/usr.bin/cap_mkdb/cap_mkdb.c index 6e3186f169e..5c0005cb98b 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.10 2003/06/03 02:56:06 millert Exp $ */ +/* $OpenBSD: cap_mkdb.c,v 1.11 2003/06/10 22:20:45 deraadt Exp $ */ /* $NetBSD: cap_mkdb.c,v 1.5 1995/09/02 05:47:12 jtc Exp $ */ /*- @@ -40,7 +40,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.10 2003/06/03 02:56:06 millert Exp $"; +static char rcsid[] = "$OpenBSD: cap_mkdb.c,v 1.11 2003/06/10 22:20:45 deraadt Exp $"; #endif /* not lint */ #include @@ -84,9 +84,7 @@ HASHINFO openinfo = { * the correct record is stored. */ int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int c; @@ -136,7 +134,7 @@ main(argc, argv) } void -dounlink() +dounlink(void) { if (capname != NULL) (void)unlink(capname); @@ -155,8 +153,7 @@ dounlink() * details above. */ void -db_build(ifiles) - char **ifiles; +db_build(char **ifiles) { DBT key, data; recno_t reccnt; @@ -301,7 +298,7 @@ db_build(ifiles) } void -usage() +usage(void) { (void)fprintf(stderr, "usage: cap_mkdb [-iv] [-f outfile] file1 [file2 ...]\n"); diff --git a/usr.bin/cap_mkdb/getinfo.c b/usr.bin/cap_mkdb/getinfo.c index dcc1a8344ba..5a026a49645 100644 --- a/usr.bin/cap_mkdb/getinfo.c +++ b/usr.bin/cap_mkdb/getinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getinfo.c,v 1.6 2003/06/04 16:24:45 deraadt Exp $ */ +/* $OpenBSD: getinfo.c,v 1.7 2003/06/10 22:20:45 deraadt Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -30,7 +30,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: getinfo.c,v 1.6 2003/06/04 16:24:45 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: getinfo.c,v 1.7 2003/06/10 22:20:45 deraadt Exp $"; #endif /* not lint */ #include @@ -74,9 +74,7 @@ int igetnext(char **, char **); * return NULL. */ static char * -igetcap(buf, cap, type) - char *buf, *cap; - int type; +igetcap(char *buf, char *cap, int type) { char *bp, *cp; @@ -135,10 +133,7 @@ igetcap(buf, cap, type) * MAX_RECURSION. */ static int -getent(cap, len, db_array, fd, name, depth) - char **cap, **db_array, *name; - u_int *len; - int fd, depth; +getent(char **cap, u_int *len, char **db_array, int fd, char *name, int depth) { char *r_end, *rp, **db_p; int myfd, eof, foundit; @@ -464,8 +459,7 @@ getent(cap, len, db_array, fd, name, depth) * record buf, -1 if not. */ static int -igetmatch(buf, name) - char *buf, *name; +igetmatch(char *buf, char *name) { char *np, *bp; @@ -507,7 +501,7 @@ static int slash; static char **dbp; static int -igetclose() +igetclose(void) { if (pfp != NULL) { (void)fclose(pfp); @@ -524,9 +518,7 @@ igetclose() * upon returning an entry with more remaining, and -1 if an error occurs. */ int -igetnext(bp, db_array) - char **bp; - char **db_array; +igetnext(char **bp, char **db_array) { size_t len; int status, done; -- cgit v1.2.3