From nobody Tue Apr 18 18:31:32 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1CDl5Jpdz45TgL; Tue, 18 Apr 2023 18:31:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1CDk6Vf7z41Z3; Tue, 18 Apr 2023 18:31:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V0IVnbY3jfWMu7o86VffEo8qwm0+pofNlmiMCVpmRDE=; b=nUs8/kEnCthgkZfFA3N6kUSn4A3c5gAayvSWZNbuteyyMf3IH9Zbo/sQAK3ZerBejUHNJR 1QdhaZTlEFE+R0/joEzwJH2GXEZEdE0dAcDaDAonuTyqSLujYRluX6dLX+DSnuGkLHoOR4 vYK9FWxtI9qRX3jduSZNXVuF/s4eSYZmKpx7XkfdoeZ0Db5r5GBMVj0EERnRTIl1E3E6YI UD/9irFOJxwP1Fmh8Latiu4NBU43TJeQRxJjJGiX95sTCgV4YSQ1qIwIuvC6Mqdr3mXdAk ag4DOotjIMbyTROx9iprqsJr6UE7935ZQLRbV+Fydv3lO5v3rJzsGKRSOhs0Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681842695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V0IVnbY3jfWMu7o86VffEo8qwm0+pofNlmiMCVpmRDE=; b=GwLwewgb5F34XAQZdd9akYTFY7OO/RQCN0Qd5mbw7rfoWJ222puH1mk9/YKoytUBsuPLre uh7i3p1cyHB697t/TnGASECCVtvHH6AQ/LUpAESfcU5FCcmcHc/2W++GY5LDTuG+mDhoJh Yt/BmSTYXL/kt8HB1RUzdbB+5BDqGkR3SwPIi6ZXvPy7BWNUhth5VXVBPDWUVI3HYsHPEy iUjuLfPWFK+IWZkB7JAj14bU0sr/5yiTIu4e4rf/8IDvvBWK47NB39YFi363hfwcJtVrkE IFKHns96PP3h1RU9zRrMlq2dAnAs8qabN1JjEZQwxGZ5QMWos+9SWBVfpYz7Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681842695; a=rsa-sha256; cv=none; b=o3JBENOdTGeflg8uBYtiq5cc6BdnKWPRREx/4ZHtyb9qIE3IiO3lHmmUQKustQ01QAiion NCvMroGEpRHCZoALgUU9vf6sQ8ewqpRiaIDRvsOQOTd+NCaw5PbpjaCpReJbfAPzypp4H+ /4Z2GQd3OwuZPR61VptS14UB658mLi2lWYJZVw2VmXGwf+yGdag9r+hnqe2iYKHNe0bUgX l8OwHMB53XgWpD9E3uv7ZTAkwV5xxzO5pW19S9eRza8XvLJjyxyWghSZUfehSnH1IEAENk rdhzjAzc3+4RyZf7SRpjzd046IprBBL4LD7q5vh+Lcs9h+iRd+KOiE8LIxiqAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1CDh6zqCzNDC; Tue, 18 Apr 2023 18:31:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33IIVWuD028332; Tue, 18 Apr 2023 18:31:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IIVWPe028331; Tue, 18 Apr 2023 18:31:32 GMT (envelope-from git) Date: Tue, 18 Apr 2023 18:31:32 GMT Message-Id: <202304181831.33IIVWPe028331@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c330a185b7a7 - main - locate: Use C89 function definitions. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c330a185b7a781e3fc805992a618fcf4764825ec Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c330a185b7a781e3fc805992a618fcf4764825ec commit c330a185b7a781e3fc805992a618fcf4764825ec Author: John Baldwin AuthorDate: 2023-04-18 18:27:08 +0000 Commit: John Baldwin CommitDate: 2023-04-18 18:27:08 +0000 locate: Use C89 function definitions. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39526 --- usr.bin/locate/locate/fastfind.c | 15 +++------------ usr.bin/locate/locate/util.c | 15 +++++---------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/usr.bin/locate/locate/fastfind.c b/usr.bin/locate/locate/fastfind.c index 2300d17cff00..f9c708b59509 100644 --- a/usr.bin/locate/locate/fastfind.c +++ b/usr.bin/locate/locate/fastfind.c @@ -40,9 +40,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) { long lines, chars, size, size_nbg, big, zwerg, umlaut; u_char *p, *s; @@ -128,11 +126,7 @@ fastfind_mmap_icase #else fastfind_mmap #endif /* FF_ICASE */ -(pathpart, paddr, len, database) - char *pathpart; /* search string */ - caddr_t paddr; /* mmap pointer */ - off_t len; /* length of database */ - char *database; /* for error message */ +(char *pathpart, caddr_t paddr, off_t len, char *database) #else /* MMAP */ @@ -144,10 +138,7 @@ fastfind_icase fastfind #endif /* FF_ICASE */ -(fp, pathpart, database) - FILE *fp; /* open database */ - char *pathpart; /* search string */ - char *database; /* for error message */ +(FILE *fp, char *pathpart, char *database) #endif /* MMAP */ diff --git a/usr.bin/locate/locate/util.c b/usr.bin/locate/locate/util.c index 13f733314a78..545f2097b900 100644 --- a/usr.bin/locate/locate/util.c +++ b/usr.bin/locate/locate/util.c @@ -58,8 +58,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 || @@ -138,8 +137,7 @@ colon(char **dbv, char *path, char *dot) static char globfree[100]; char * -patprep(name) - char *name; +patprep(char *name) { char *endmark, *p, *subp; @@ -192,8 +190,7 @@ patprep(name) /* tolower word */ u_char * -tolower_word(word) - u_char *word; +tolower_word(u_char *word) { u_char *p; @@ -215,8 +212,7 @@ tolower_word(word) */ int -getwm(p) - caddr_t p; +getwm(caddr_t p) { union { char buf[INTSIZE]; @@ -252,8 +248,7 @@ getwm(p) */ int -getwf(fp) - FILE *fp; +getwf(FILE *fp) { int word, hword; int i_max = LOCATE_PATH_MAX + OFFSET;