Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: bgpd: no longer expose vlog() outside of log.c
To:
tech@openbsd.org
Date:
Thu, 30 Apr 2026 14:53:48 +0100

Download raw body.

Thread
ok

On 2026/04/30 15:16, Claudio Jeker wrote:
> Nothing uses vlog() apart from log.c, make sure it stays like this.
> 
> -- 
> :wq Claudio
> 
> Index: log.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/bgpd/log.c,v
> diff -u -p -r1.64 log.c
> --- log.c	21 Mar 2017 12:06:55 -0000	1.64
> +++ log.c	29 Apr 2026 13:49:39 -0000
> @@ -30,6 +30,9 @@ static int		 debug;
>  static int		 verbose;
>  static const char	*log_procname;
>  
> +static void	vlog(int, const char *, va_list)
> +		    __attribute__((__format__ (printf, 2, 0)));
> +
>  void
>  log_init(int n_debug, int facility)
>  {
> @@ -74,7 +77,7 @@ logit(int pri, const char *fmt, ...)
>  	va_end(ap);
>  }
>  
> -void
> +static void
>  vlog(int pri, const char *fmt, va_list ap)
>  {
>  	char	*nfmt;
> Index: log.h
> ===================================================================
> RCS file: /cvs/src/usr.sbin/bgpd/log.h,v
> diff -u -p -r1.20 log.h
> --- log.h	21 Oct 2020 06:48:33 -0000	1.20
> +++ log.h	29 Apr 2026 13:49:18 -0000
> @@ -36,8 +36,6 @@ void	log_debug(const char *, ...)
>  	    __attribute__((__format__ (printf, 1, 2)));
>  void	logit(int, const char *, ...)
>  	    __attribute__((__format__ (printf, 2, 3)));
> -void	vlog(int, const char *, va_list)
> -	    __attribute__((__format__ (printf, 2, 0)));
>  __dead void fatal(const char *, ...)
>  	    __attribute__((__format__ (printf, 1, 2)));
>  __dead void fatalx(const char *, ...)
>