diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2023-04-28 20:22:36 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2023-04-28 20:22:36 +0000 |
commit | 87c408da5e5c9886b2a5e8d71b09f542c3c75819 (patch) | |
tree | dd8614fdfa7462308eaef8d872e4ea5afb30ea2c | |
parent | c6f414418729e6a80d85bccdb1a9d0a198b561e8 (diff) |
Make LLVM 15 happier by changing from K&R to ANSI prototypes
-rw-r--r-- | usr.bin/locate/locate/fastfind.c | 15 | ||||
-rw-r--r-- | usr.bin/locate/locate/util.c | 19 |
2 files changed, 9 insertions, 25 deletions
diff --git a/usr.bin/locate/locate/fastfind.c b/usr.bin/locate/locate/fastfind.c index 1b8dd4c7b56..aec9078c980 100644 --- a/usr.bin/locate/locate/fastfind.c +++ b/usr.bin/locate/locate/fastfind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fastfind.c,v 1.16 2019/01/17 06:15:44 tedu Exp $ */ +/* $OpenBSD: fastfind.c,v 1.17 2023/04/28 20:22:35 tb Exp $ */ /* * Copyright (c) 1995 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. @@ -37,9 +37,7 @@ #define _LOCATE_STATISTIC_ void -statistic (fp, path_fcodes) - FILE *fp; /* open database */ - char *path_fcodes; /* for error message */ +statistic (FILE *fp, char *path_fcodes) { int lines, chars, size, big, zwerg; u_char *p, *s; @@ -108,14 +106,7 @@ fastfind_mmap_icase #else fastfind_mmap #endif /* FF_ICASE */ -(pathpart, paddr, len, database) - char *pathpart; /* search string */ - caddr_t paddr; /* mmap pointer */ - int len; /* length of database */ - char *database; /* for error message */ - - - +(char *pathpart, caddr_t paddr, int len, char *database) { u_char *p, *s, *patend, *q, *foundchar; int c, cc; diff --git a/usr.bin/locate/locate/util.c b/usr.bin/locate/locate/util.c index f8c08eff41d..5d083989f26 100644 --- a/usr.bin/locate/locate/util.c +++ b/usr.bin/locate/locate/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.16 2019/01/17 06:15:44 tedu Exp $ +/* $OpenBSD: util.c,v 1.17 2023/04/28 20:22:35 tb Exp $ * * Copyright (c) 1995 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. * Copyright (c) 1989, 1993 @@ -52,8 +52,7 @@ int check_bigram_char(int); * or the database is obviously not a locate database. */ int -check_bigram_char(ch) - int ch; +check_bigram_char(int ch) { /* legal bigram: 0, ASCII_MIN ... ASCII_MAX */ if (ch == 0 || @@ -75,10 +74,7 @@ check_bigram_char(ch) * */ char ** -colon(dbv, path, dot) - char **dbv; - char *path; - char *dot; /* default for single ':' */ +colon(char **dbv, char *path, char *dot) { int vlen, slen; char *c, *ch, *p; @@ -140,8 +136,7 @@ colon(dbv, path, dot) static char globfree[100]; char * -patprep(name) - char *name; +patprep(char *name) { char *endmark, *p, *subp; @@ -202,8 +197,7 @@ patprep(name) */ int -getwm(p) - caddr_t p; +getwm(caddr_t p) { union { char buf[sizeof(int)]; @@ -237,8 +231,7 @@ getwm(p) */ int -getwf(fp) - FILE *fp; +getwf(FILE *fp) { int word; |