Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 2023 11:39:09 -0700
From:      Cy Schubert <Cy.Schubert@cschubert.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 2ac057dd33e8 - main - ipf: Use C89 function definitions.
Message-ID:  <20230418183909.8522B309@slippy.cwsent.com>
In-Reply-To: <202304181831.33IIVUT0027481@gitrepo.freebsd.org>
References:  <202304181831.33IIVUT0027481@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <202304181831.33IIVUT0027481@gitrepo.freebsd.org>, John Baldwin 
writ
es:
> The branch main has been updated by jhb:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=2ac057dd33e85e3e4ca1095f80bdc009
> 74a1132c
>
> commit 2ac057dd33e85e3e4ca1095f80bdc00974a1132c
> Author:     John Baldwin <jhb@FreeBSD.org>
> AuthorDate: 2023-04-18 18:22:28 +0000
> Commit:     John Baldwin <jhb@FreeBSD.org>
> CommitDate: 2023-04-18 18:22:28 +0000
>
>     ipf: Use C89 function definitions.
>     
>     Reviewed by:    zlei
>     Differential Revision:  https://reviews.freebsd.org/D39523
> ---
>  sbin/ipf/common/genmask.c    |  6 ++----
>  sbin/ipf/common/lexer.c      |  3 +--
>  sbin/ipf/ipf/bpf_filter.c    | 18 ++++--------------
>  sbin/ipf/ipfstat/ipfstat.c   |  3 +--
>  sbin/ipf/ipmon/ipmon.c       |  5 +----
>  sbin/ipf/libipf/mutex_emul.c |  5 +----
>  sbin/ipf/libipf/poolio.c     |  5 +----
>  sbin/ipf/libipf/var.c        |  3 +--
>  8 files changed, 12 insertions(+), 36 deletions(-)
>
> diff --git a/sbin/ipf/common/genmask.c b/sbin/ipf/common/genmask.c
> index 5b715cf4c901..a3b912b67ef3 100644
> --- a/sbin/ipf/common/genmask.c
> +++ b/sbin/ipf/common/genmask.c
> @@ -9,10 +9,8 @@
>  #include "ipf.h"
>  
>  
> -int genmask(family, msk, mskp)
> -	int family;
> -	char *msk;
> -	i6addr_t *mskp;
> +int
> +genmask(int family, char *msk, i6addr_t *mskp)
>  {
>  	char *endptr = 0L;
>  	u_32_t addr;
> diff --git a/sbin/ipf/common/lexer.c b/sbin/ipf/common/lexer.c
> index 16fbb2272034..12ec3c825dd4 100644
> --- a/sbin/ipf/common/lexer.c
> +++ b/sbin/ipf/common/lexer.c
> @@ -603,8 +603,7 @@ done:
>  }
>  
>  
> -static wordtab_t *yyfindkey(key)
> -	char *key;
> +static wordtab_t *yyfindkey(char *key)
>  {
>  	wordtab_t *w;
>  
> diff --git a/sbin/ipf/ipf/bpf_filter.c b/sbin/ipf/ipf/bpf_filter.c
> index fbb0138f51d8..64d416feaf36 100644
> --- a/sbin/ipf/ipf/bpf_filter.c
> +++ b/sbin/ipf/ipf/bpf_filter.c
> @@ -117,9 +117,7 @@ static int m_xhalf(mb_t *, int, int *);
>  }
>  
>  static int
> -m_xword(m, k, err)
> -	register mb_t *m;
> -	register int k, *err;
> +m_xword(mb_t *m, int k, int *err)
>  {
>  	register int len;
>  	register u_char *cp, *np;
> @@ -153,9 +151,7 @@ m_xword(m, k, err)
>  }
>  
>  static int
> -m_xhalf(m, k, err)
> -	register mb_t *m;
> -	register int k, *err;
> +m_xhalf(mb_t *m, int k, int *err)
>  {
>  	register int len;
>  	register u_char *cp;
> @@ -185,11 +181,7 @@ m_xhalf(m, k, err)
>   * in all other cases, p is a pointer to a buffer and buflen is its size.
>   */
>  u_int
> -bpf_filter(pc, p, wirelen, buflen)
> -	register struct bpf_insn *pc;
> -	register u_char *p;
> -	u_int wirelen;
> -	register u_int buflen;
> +bpf_filter(struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen)
>  {
>  	register u_int32 A, X;
>  	register int k;
> @@ -478,9 +470,7 @@ bpf_filter(pc, p, wirelen, buflen)
>   * Otherwise, a bogus program could easily crash the system.
>   */
>  int
> -bpf_validate(f, len)
> -	struct bpf_insn *f;
> -	int len;
> +bpf_validate(struct bpf_insn *f, int len)
>  {
>  	u_int i, from;
>  	const struct bpf_insn *p;
> diff --git a/sbin/ipf/ipfstat/ipfstat.c b/sbin/ipf/ipfstat/ipfstat.c
> index 11b3043f919c..55c876724d4a 100644
> --- a/sbin/ipf/ipfstat/ipfstat.c
> +++ b/sbin/ipf/ipfstat/ipfstat.c
> @@ -162,8 +162,7 @@ static	int	sort_dstpt(const void *, const void *);
>  #endif
>  
>  
> -static void usage(name)
> -	char *name;
> +static void usage(char *name)
>  {
>  #ifdef  USE_INET6
>  	fprintf(stderr, "Usage: %s [-46aAdfghIilnoRsv]\n", name);
> diff --git a/sbin/ipf/ipmon/ipmon.c b/sbin/ipf/ipmon/ipmon.c
> index f71a33b1034e..4f07dda27e62 100644
> --- a/sbin/ipf/ipmon/ipmon.c
> +++ b/sbin/ipf/ipmon/ipmon.c
> @@ -470,10 +470,7 @@ read_log(int fd, int *lenp, char *buf, int bufsize)
>  
>  
>  char *
> -portlocalname(res, proto, port)
> -	int res;
> -	char *proto;
> -	u_int port;
> +portlocalname(int res, char *proto, u_int port)
>  {
>  	static char pname[8];
>  	char *s;
> diff --git a/sbin/ipf/libipf/mutex_emul.c b/sbin/ipf/libipf/mutex_emul.c
> index 3152d2e47013..a7e1c1389901 100644
> --- a/sbin/ipf/libipf/mutex_emul.c
> +++ b/sbin/ipf/libipf/mutex_emul.c
> @@ -85,10 +85,7 @@ eMmutex_init(eMmutex_t *mtx, char *who, char *file, int li
> ne)
>  
>  
>  void
> -eMmutex_destroy(mtx, file, line)
> -	eMmutex_t *mtx;
> -	char *file;
> -	int line;
> +eMmutex_destroy(eMmutex_t *mtx, char *file, int line)
>  {
>  	if (mutex_debug & 1)
>  		fprintf(mutex_file,
> diff --git a/sbin/ipf/libipf/poolio.c b/sbin/ipf/libipf/poolio.c
> index 765d37fae350..f12120fd5467 100644
> --- a/sbin/ipf/libipf/poolio.c
> +++ b/sbin/ipf/libipf/poolio.c
> @@ -28,10 +28,7 @@ pool_open(void)
>  }
>  
>  int
> -pool_ioctl(iocfunc, cmd, ptr)
> -	ioctlfunc_t iocfunc;
> -	ioctlcmd_t cmd;
> -	void *ptr;
> +pool_ioctl(ioctlfunc_t iocfunc, ioctlcmd_t cmd, void *ptr)
>  {
>  	return (*iocfunc)(poolfd, cmd, ptr);
>  }
> diff --git a/sbin/ipf/libipf/var.c b/sbin/ipf/libipf/var.c
> index d3a03b6e46d7..47eb5d1595df 100644
> --- a/sbin/ipf/libipf/var.c
> +++ b/sbin/ipf/libipf/var.c
> @@ -24,8 +24,7 @@ static variable_t *find_var(char *);
>  static char *expand_string(char *, int);
>  
>  
> -static variable_t *find_var(name)
> -	char *name;
> +static variable_t *find_var(char *name)
>  {
>  	variable_t *v;
>  
>

Thanks. Looks like I missed some.


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

			e^(i*pi)+1=0






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230418183909.8522B309>