From nobody Mon Dec 06 15:56:16 2021 X-Original-To: dev-commits-src-all@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 9F76418C52D4; Mon, 6 Dec 2021 15:56:18 +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 4J77MP1nV0z4bX9; Mon, 6 Dec 2021 15:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 B66BC6854; Mon, 6 Dec 2021 15:56:16 +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 1B6FuGTo033312; Mon, 6 Dec 2021 15:56:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B6FuGA8033311; Mon, 6 Dec 2021 15:56:16 GMT (envelope-from git) Date: Mon, 6 Dec 2021 15:56:16 GMT Message-Id: <202112061556.1B6FuGA8033311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 85ba40da4ca5 - stable/13 - ANSIify libsa functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 85ba40da4ca5d44889ad881be62e2acd7de9b983 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638806177; 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=cm/tMam8bT0y0EIZoYmFeFj9vl1oKiYGsjSqnBinYDM=; b=lDK2KaXXZsZWzr2PvUhQ3CzLZ6FGHxN/a3br4Vp/rDRUHAC2eOMF/DT6svX+I7pv6VhBVh GwPo6HH3CX0KGV8g75NWl8bA7CmQTg5O9NAKl9m4rfPPebXZV0Nf8PsZKmGDElKWUrZzgK ygyszWqXL+APwf1ZxuCw0yajQzcNpM8uE4zOyGliVsDgVqRdl4EPis+trLkH7An044kz6F W++J+GHWvd19rrvk+411kSclp3hKJX7EX6CBtQV5oOUD0C+xHRGK75xj1ZtdcHkqseRsPe uQnFN3gW79iqxL8CRFcoxTLRF64iHR4kxoOMTxCkgSxz/J/BzLhONiAy+lTpgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638806177; a=rsa-sha256; cv=none; b=dzBoOkVhYpY44eyrq4/mib9XYOmzmCJMis6ZT/ixlSYHIAoROGBmmDgciLqOiztrJZ5vww tUf8ryLLcecqzGkvwBCFEFyYX5rEEJCDqMpvZ1lfbZ9TX9wSDEXt7eY1qiWVWKuMBU2AYa CsguciNN/ut44rTeS8J1glOYdxTxl/dyAB0jaXjE79jjzOw8kGp/acb1mn8/v8I3nYUs7Y 0s6kREE27uYHH3CoytUXevaLth2Gt+BtEoUZiRNuuYGCbizAoLJ0XSiPioI77eHOCMIObE 87JgU8/yzjgf+m09zPs0O0AbyeJIJfdn3zVrq7htFlgH5tZ4OLZTqgJca1OxbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=85ba40da4ca5d44889ad881be62e2acd7de9b983 commit 85ba40da4ca5d44889ad881be62e2acd7de9b983 Author: Alfonso AuthorDate: 2021-07-07 14:52:21 +0000 Commit: Warner Losh CommitDate: 2021-12-06 15:55:54 +0000 ANSIify libsa functions Convert libsa files to use ANSI function definitions. Pull request: https://github.com/freebsd/freebsd-src/pull/508 [ cut and paste error corrected ] (cherry picked from commit 1f629966d683ca2e79adbc6c39e7ec5f1a87832f) --- stand/libsa/dev.c | 9 +++------ stand/libsa/in_cksum.c | 4 +--- stand/libsa/inet_ntoa.c | 3 +-- stand/libsa/stat.c | 4 +--- stand/libsa/strcasecmp.c | 7 ++----- stand/libsa/strdup.c | 3 +-- 6 files changed, 9 insertions(+), 21 deletions(-) diff --git a/stand/libsa/dev.c b/stand/libsa/dev.c index 20f3100852e7..1d1dd075580e 100644 --- a/stand/libsa/dev.c +++ b/stand/libsa/dev.c @@ -40,22 +40,19 @@ __FBSDID("$FreeBSD$"); #include "stand.h" int -nodev() +nodev(void) { return (ENXIO); } void -nullsys() +nullsys(void) { } /* ARGSUSED */ int -noioctl(f, cmd, data) - struct open_file *f; - u_long cmd; - void *data; +noioctl(struct open_file *f __unused, u_long cmd __unused, void *data __unused) { return (EINVAL); } diff --git a/stand/libsa/in_cksum.c b/stand/libsa/in_cksum.c index 97782152d71d..2f8c448fc0eb 100644 --- a/stand/libsa/in_cksum.c +++ b/stand/libsa/in_cksum.c @@ -50,9 +50,7 @@ __FBSDID("$FreeBSD$"); * In particular, it should not be this one. */ int -in_cksum(p, len) - void *p; - int len; +in_cksum(void *p, int len) { int sum = 0, oddbyte = 0, v = 0; u_char *cp = p; diff --git a/stand/libsa/inet_ntoa.c b/stand/libsa/inet_ntoa.c index f675a0ff7736..45c79f26151d 100644 --- a/stand/libsa/inet_ntoa.c +++ b/stand/libsa/inet_ntoa.c @@ -45,8 +45,7 @@ static char sccsid[] = "@(#)inet_ntoa.c 8.1 (Berkeley) 6/4/93"; * to base 256 d.d.d.d representation. */ char * -inet_ntoa(in) - struct in_addr in; +inet_ntoa(struct in_addr in) { static const char fmt[] = "%u.%u.%u.%u"; static char ret[sizeof "255.255.255.255"]; diff --git a/stand/libsa/stat.c b/stand/libsa/stat.c index 9875372b441d..f3b198955ab8 100644 --- a/stand/libsa/stat.c +++ b/stand/libsa/stat.c @@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$"); #include "stand.h" int -stat(str, sb) - const char *str; - struct stat *sb; +stat(const char *str, struct stat *sb) { int fd, rv; diff --git a/stand/libsa/strcasecmp.c b/stand/libsa/strcasecmp.c index f8131019384c..12ec81b022c4 100644 --- a/stand/libsa/strcasecmp.c +++ b/stand/libsa/strcasecmp.c @@ -39,8 +39,7 @@ static char sccsid[] = "@(#)strcasecmp.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ int -strcasecmp(s1, s2) - const char *s1, *s2; +strcasecmp(const char *s1, const char *s2) { const u_char *us1 = (const u_char *)s1, @@ -53,9 +52,7 @@ strcasecmp(s1, s2) } int -strncasecmp(s1, s2, n) - const char *s1, *s2; - size_t n; +strncasecmp(const char *s1, const char *s2, size_t n) { if (n != 0) { const u_char diff --git a/stand/libsa/strdup.c b/stand/libsa/strdup.c index de6c4def8bc6..ad7200c69850 100644 --- a/stand/libsa/strdup.c +++ b/stand/libsa/strdup.c @@ -39,8 +39,7 @@ static char sccsid[] = "@(#)strdup.c 8.1 (Berkeley) 6/4/93"; #include char * -strdup(str) - const char *str; +strdup(const char *str) { size_t len; char *copy = NULL;