From 8a45067fc6286e2cf7ba606440e48663c6524bd2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 18 Nov 2024 12:33:24 +0100 Subject: [PATCH] term-utils: make pointer arrays const --- term-utils/agetty.c | 4 ++-- term-utils/setterm.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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", -- 2.47.2