]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
term-utils: make pointer arrays const
authorMax Kellermann <max.kellermann@gmail.com>
Mon, 18 Nov 2024 11:33:24 +0000 (12:33 +0100)
committerMax Kellermann <max.kellermann@gmail.com>
Mon, 18 Nov 2024 11:35:59 +0000 (12:35 +0100)
term-utils/agetty.c
term-utils/setterm.c

index 7a1da5ee5e4d77f514dc5395a4d5aaeb80f83c17..1f81a753450878faa5b6ce24eac4fc7617b8a6f8 100644 (file)
@@ -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 */
index 8ec10ee5e016ea217b0fd3e6ec0b0703fad7e806..a41a5c98ed99c35f6615754428964b02f3ab2c02 100644 (file)
@@ -99,7 +99,7 @@ enum {
        DEFAULT
 };
 
-static const char *colornames[] = {
+static const char *const colornames[] = {
        [BLACK] = "black",
        [RED]   = "red",
        [GREEN] = "green",