summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pppd
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2013-10-27 18:49:25 +0000
committerguenther <guenther@openbsd.org>2013-10-27 18:49:25 +0000
commit390b7edb69e257eeb514689ee52c15ebd69cccda (patch)
tree3cc5e144428de10e41d3b69c08f6f2897d53b00a /usr.sbin/pppd
parentIf a constant string needs a name, use a static const array instead of a (diff)
downloadwireguard-openbsd-390b7edb69e257eeb514689ee52c15ebd69cccda.tar.xz
wireguard-openbsd-390b7edb69e257eeb514689ee52c15ebd69cccda.zip
If a constant string needs a name, use a static const array instead of a
pointer or non-const array, as that minimizes the symbols, maximizes the placement into read-only memory, and avoids warnings from gcc -Wformat=2 when they're used as format strings. ok deraadt@
Diffstat (limited to 'usr.sbin/pppd')
-rw-r--r--usr.sbin/pppd/options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pppd/options.c b/usr.sbin/pppd/options.c
index e0d708b7b86..689c9b6c1f0 100644
--- a/usr.sbin/pppd/options.c
+++ b/usr.sbin/pppd/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.25 2011/10/02 06:25:53 nicm Exp $ */
+/* $OpenBSD: options.c,v 1.26 2013/10/27 18:49:25 guenther Exp $ */
/*
* options.c - handles option processing for PPP.
@@ -399,7 +399,7 @@ static struct cmd {
#define IMPLEMENTATION ""
#endif
-static char *usage_string = "\
+static const char usage_string[] = "\
pppd version %s patch level %d%s\n\
Usage: %s [ options ], where options are:\n\
<device> Communicate over the named device\n\