-/* $Id: extern.h,v 1.34 2020/11/24 16:54:44 claudio Exp $ */
+/* $Id: extern.h,v 1.35 2021/03/22 11:14:42 claudio Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
*
u_int num;
u_int nalloc;
};
-void addargs(arglist *, char *, ...)
+void addargs(arglist *, const char *, ...)
__attribute__((format(printf, 2, 3)));
void freeargs(arglist *);
-/* $OpenBSD: misc.c,v 1.1 2019/04/02 05:32:08 deraadt Exp $ */
+/* $OpenBSD: misc.c,v 1.2 2021/03/22 11:14:42 claudio Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005,2006 Damien Miller. All rights reserved.
/* function to assist building execv() arguments */
void
-addargs(arglist *args, char *fmt, ...)
+addargs(arglist *args, const char *fmt, ...)
{
- va_list ap;
- char *cp;
- u_int nalloc;
- int r;
+ va_list ap;
+ char *cp;
+ u_int nalloc;
+ int r;
va_start(ap, fmt);
r = vasprintf(&cp, fmt, ap);