From: kn Date: Wed, 19 Oct 2022 07:57:49 +0000 (+0000) Subject: Constify string tables X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8a67d8abd4e7110e0f6bba9899369efac5404790;p=openbsd Constify string tables Each only used one for a printf() call in *_attach(). Seen while tweaking their *_hw_if struct. OK gnezdo ratchov --- diff --git a/sys/dev/isa/ess.c b/sys/dev/isa/ess.c index d7d7308967d..1bdc170e646 100644 --- a/sys/dev/isa/ess.c +++ b/sys/dev/isa/ess.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ess.c,v 1.29 2022/10/18 08:22:18 kn Exp $ */ +/* $OpenBSD: ess.c,v 1.30 2022/10/19 07:57:49 kn Exp $ */ /* $NetBSD: ess.c,v 1.44.4.1 1999/06/21 01:18:00 thorpej Exp $ */ /* @@ -181,7 +181,7 @@ void ess_clear_mreg_bits(struct ess_softc *, u_char, u_char); void ess_set_mreg_bits(struct ess_softc *, u_char, u_char); void ess_read_multi_mix_reg(struct ess_softc *, u_char, u_int8_t *, bus_size_t); -static char *essmodel[] = { +static const char *essmodel[] = { "unsupported", "1888", "1887", diff --git a/sys/dev/isa/pas.c b/sys/dev/isa/pas.c index 4c9d01f294f..677a266ca5a 100644 --- a/sys/dev/isa/pas.c +++ b/sys/dev/isa/pas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pas.c,v 1.33 2022/04/06 18:59:28 naddy Exp $ */ +/* $OpenBSD: pas.c,v 1.34 2022/10/19 07:57:49 kn Exp $ */ /* $NetBSD: pas.c,v 1.37 1998/01/12 09:43:43 thorpej Exp $ */ /* @@ -136,7 +136,7 @@ const struct audio_hw_if pas_hw_if = { /* The Address Translation code is used to convert I/O register addresses to be relative to the given base -register */ -static char *pasnames[] = { +static const char *pasnames[] = { "", "Plus", "CDPC",