]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libsmartcols: make pointer arrays const
authorMax Kellermann <max.kellermann@gmail.com>
Mon, 18 Nov 2024 11:35:21 +0000 (12:35 +0100)
committerMax Kellermann <max.kellermann@gmail.com>
Mon, 18 Nov 2024 11:36:03 +0000 (12:36 +0100)
libsmartcols/src/filter-param.c
libsmartcols/src/grouping.c

index 8b8218d738e42a14e4d29b7d91af5b05dc40c433..636d4e5ee90ca21b7466f48e5348665c53b3b46e 100644 (file)
@@ -32,7 +32,7 @@ static int cast_param(int type, struct filter_param *n);
 
 static inline const char *datatype2str(int type)
 {
-       static const char *types[] = {
+       static const char *const types[] = {
                [SCOLS_DATA_NONE] = "none",
                [SCOLS_DATA_STRING] = "string",
                [SCOLS_DATA_U64] = "u64",
index e43838e678cf3d421aea093a3b778ec445db697d..7e004b6477d025e9e92fc76da4949e8211ee0f91 100644 (file)
@@ -142,7 +142,7 @@ void scols_groups_fix_members_order(struct libscols_table *tb)
 
 static inline const char *group_state_to_string(int state)
 {
-       static const char *grpstates[] = {
+       static const char *const grpstates[] = {
                [SCOLS_GSTATE_NONE]             = "none",
                [SCOLS_GSTATE_FIRST_MEMBER]     = "1st-member",
                [SCOLS_GSTATE_MIDDLE_MEMBER]    = "middle-member",