summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpjanzen <pjanzen@openbsd.org>1998-09-15 05:22:45 +0000
committerpjanzen <pjanzen@openbsd.org>1998-09-15 05:22:45 +0000
commit2e1edb43ce8a8fecc54317af9841a3b712097325 (patch)
tree5b4cdaae0b4baa0e4438a0dd4f85b22f50e85d4d
parentGet rid of unused out-of-date file (diff)
downloadwireguard-openbsd-2e1edb43ce8a8fecc54317af9841a3b712097325.tar.xz
wireguard-openbsd-2e1edb43ce8a8fecc54317af9841a3b712097325.zip
use const where appropriate; jsm28@cam.ac.uk
-rw-r--r--games/arithmetic/arithmetic.c12
-rw-r--r--games/banner/banner.c8
2 files changed, 10 insertions, 10 deletions
diff --git a/games/arithmetic/arithmetic.c b/games/arithmetic/arithmetic.c
index d6c809bb56d..7966cc22c8c 100644
--- a/games/arithmetic/arithmetic.c
+++ b/games/arithmetic/arithmetic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arithmetic.c,v 1.7 1998/08/19 07:39:50 pjanzen Exp $ */
+/* $OpenBSD: arithmetic.c,v 1.8 1998/09/15 05:22:45 pjanzen Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -46,7 +46,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)arithmetic.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: arithmetic.c,v 1.7 1998/08/19 07:39:50 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: arithmetic.c,v 1.8 1998/09/15 05:22:45 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -96,9 +96,9 @@ int problem __P((void));
void showstats __P((void));
void usage __P((void));
-char keylist[] = "+-x/";
-char defaultkeys[] = "+-";
-char *keys = defaultkeys;
+const char keylist[] = "+-x/";
+const char defaultkeys[] = "+-";
+const char *keys = defaultkeys;
int nkeys = sizeof(defaultkeys) - 1;
int rangemax = 10;
int nright, nwrong;
@@ -128,7 +128,7 @@ main(argc, argv)
while ((ch = getopt(argc, argv, "hr:o:")) != -1)
switch(ch) {
case 'o': {
- register char *p;
+ const char *p;
for (p = keys = optarg; *p; ++p)
if (!strchr(keylist, *p))
diff --git a/games/banner/banner.c b/games/banner/banner.c
index f5f6f35ad34..e49f14fa603 100644
--- a/games/banner/banner.c
+++ b/games/banner/banner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: banner.c,v 1.6 1998/08/19 07:40:13 pjanzen Exp $ */
+/* $OpenBSD: banner.c,v 1.7 1998/09/15 05:22:46 pjanzen Exp $ */
/* $NetBSD: banner.c,v 1.4 1995/04/22 11:55:15 cgd Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)banner.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: banner.c,v 1.6 1998/08/19 07:40:13 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: banner.c,v 1.7 1998/09/15 05:22:46 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -65,7 +65,7 @@ static char rcsid[] = "$OpenBSD: banner.c,v 1.6 1998/08/19 07:40:13 pjanzen Exp
#define NBYTES 9271
/* Pointers into data_table for each ASCII char */
-int asc_ptr[NCHARS] = {
+const int asc_ptr[NCHARS] = {
/* ^@ */ 0, 0, 0, 0, 0, 0, 0, 0,
/* ^H */ 0, 0, 0, 0, 0, 0, 0, 0,
/* ^P */ 0, 0, 0, 0, 0, 0, 0, 0,
@@ -92,7 +92,7 @@ int asc_ptr[NCHARS] = {
* is the next elt in array) and goto second
* next element in array.
*/
-char data_table[NBYTES] = {
+const char data_table[NBYTES] = {
/* 0 1 2 3 4 5 6 7 8 9 */
/* 0 */ 129, 227, 130, 34, 6, 90, 19, 129, 32, 10,
/* 10 */ 74, 40, 129, 31, 12, 64, 53, 129, 30, 14,