From: Max Kellermann Date: Mon, 18 Nov 2024 11:33:24 +0000 (+0100) Subject: term-utils: make pointer arrays const X-Git-Tag: v2.42-start~145^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a45067fc6286e2cf7ba606440e48663c6524bd2;p=thirdparty%2Futil-linux.git term-utils: make pointer arrays const --- diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 7a1da5ee5..1f81a7534 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -655,7 +655,7 @@ static void login_options_to_argv(char *argv[], int *argc, static void output_version(void) { - static const char *features[] = { + static const char *const features[] = { #ifdef DEBUGGING "debug", #endif @@ -2146,7 +2146,7 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t char c; /* input character, full eight bits */ char ascval; /* low 7 bits of input character */ int eightbit; - static char *erase[] = { /* backspace-space-backspace */ + static const char *const erase[] = { /* backspace-space-backspace */ "\010\040\010", /* space parity */ "\010\040\010", /* odd parity */ "\210\240\210", /* even parity */ diff --git a/term-utils/setterm.c b/term-utils/setterm.c index 8ec10ee5e..a41a5c98e 100644 --- a/term-utils/setterm.c +++ b/term-utils/setterm.c @@ -99,7 +99,7 @@ enum { DEFAULT }; -static const char *colornames[] = { +static const char *const colornames[] = { [BLACK] = "black", [RED] = "red", [GREEN] = "green",