diff options
| author | Raphael 'kena' Poss <knz@thaumogen.net> | 2026-01-11 21:07:35 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2026-04-24 22:04:43 +0000 |
| commit | f31e6b198faa98c4f8a7b681b4e01218f8468411 (patch) | |
| tree | c20efe90c84b56b9ce19a955088ae5dfd86f4194 | |
| parent | 45a12d8a2656bdf38e95f8e481c72aea0db6997f (diff) | |
speaker(4): move static data to text
Make this data const (it doesn't change) which will also move it to
a text section.
Signed-off-by: Raphael Poss <knz@thaumogen.net>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1922
| -rw-r--r-- | sys/dev/speaker/spkr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index 1280def98e79..d6ae47fdae99 100644 --- a/sys/dev/speaker/spkr.c +++ b/sys/dev/speaker/spkr.c @@ -158,7 +158,7 @@ struct spkr_state { #define DENOM_MULT 2 /* denominator of dot multiplier */ /* letter to half-tone: A B C D E F G */ -static int notetab[8] = {9, 11, 0, 2, 4, 5, 7}; +static const int notetab[8] = {9, 11, 0, 2, 4, 5, 7}; /* * This is the American Standard A440 Equal-Tempered scale with frequencies @@ -166,7 +166,7 @@ static int notetab[8] = {9, 11, 0, 2, 4, 5, 7}; * our octave 0 is standard octave 2. */ #define OCTAVE_NOTES 12 /* semitones per octave */ -static int pitchtab[] = +static const int pitchtab[] = { /* C C# D D# E F F# G G# A A# B*/ /* 0 */ 65, 69, 73, 78, 82, 87, 93, 98, 103, 110, 117, 123, |
