summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
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/lpr
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/lpr')
-rw-r--r--usr.sbin/lpr/common_source/displayq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/lpr/common_source/displayq.c b/usr.sbin/lpr/common_source/displayq.c
index 3f8dec20f19..ffc15f5fa7f 100644
--- a/usr.sbin/lpr/common_source/displayq.c
+++ b/usr.sbin/lpr/common_source/displayq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: displayq.c,v 1.32 2012/03/04 04:05:15 fgsch Exp $ */
+/* $OpenBSD: displayq.c,v 1.33 2013/10/27 18:49:25 guenther Exp $ */
/* $NetBSD: displayq.c,v 1.21 2001/08/30 00:51:50 itojun Exp $ */
/*
@@ -73,8 +73,8 @@ static int first; /* first file in ``files'' column? */
static int lflag; /* long output option */
static off_t totsize; /* total print job size in bytes */
-static const char *head0 = "Rank Owner Job Files";
-static const char *head1 = "Total Size\n";
+static const char head0[] = "Rank Owner Job Files";
+static const char head1[] = "Total Size\n";
static void alarmer(int);
static void inform(char *, int);