From 607abeab0a215de2924d06cbf5ebd42ef6eb615d Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 28 Apr 2023 20:22:35 +0000 Subject: [PATCH] Make LLVM 15 happier by changing from K&R to ANSI prototypes --- usr.bin/locate/locate/fastfind.c | 15 +++------------ 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 . 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 . 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; -- 2.20.1