summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2021-03-22 11:14:42 +0000
committerclaudio <claudio@openbsd.org>2021-03-22 11:14:42 +0000
commit3a011501dc6ac3349dd991cab10d8099ca1e8dcd (patch)
treef1e2c8105b9680bfc730572756f1e6313573aa8a
parentLet iwn(4) simply clear frames before the firmware's BA window, instead (diff)
downloadwireguard-openbsd-3a011501dc6ac3349dd991cab10d8099ca1e8dcd.tar.xz
wireguard-openbsd-3a011501dc6ac3349dd991cab10d8099ca1e8dcd.zip
Make fmt argument const. Format local vars a bit.
From kristaps@
-rw-r--r--usr.bin/rsync/extern.h4
-rw-r--r--usr.bin/rsync/misc.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/rsync/extern.h b/usr.bin/rsync/extern.h
index 735301f5c37..6f94fa3256c 100644
--- a/usr.bin/rsync/extern.h
+++ b/usr.bin/rsync/extern.h
@@ -1,4 +1,4 @@
-/* $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>
*
@@ -209,7 +209,7 @@ struct arglist {
u_int num;
u_int nalloc;
};
-void addargs(arglist *, char *, ...)
+void addargs(arglist *, const char *, ...)
__attribute__((format(printf, 2, 3)));
void freeargs(arglist *);
diff --git a/usr.bin/rsync/misc.c b/usr.bin/rsync/misc.c
index 2886f85f645..95cba8b5aec 100644
--- a/usr.bin/rsync/misc.c
+++ b/usr.bin/rsync/misc.c
@@ -1,4 +1,4 @@
-/* $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.
@@ -34,12 +34,12 @@
/* 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);