]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: declare array of LSM options const
authorChristian Göttsche <cgzones@googlemail.com>
Tue, 21 Feb 2023 14:28:45 +0000 (15:28 +0100)
committerChristian Göttsche <cgzones@googlemail.com>
Tue, 21 Feb 2023 14:28:45 +0000 (15:28 +0100)
libmount/src/context_mount.c

index 7491ec205b43586492f6a58a0cfc810654879854..7b897345c6ea9cf02176fae2b557bf771dac65d5 100644 (file)
@@ -29,9 +29,9 @@
 #include "strutils.h"
 
 #if defined(HAVE_LIBSELINUX) || defined(HAVE_SMACK)
-static int is_option(const char *name, const char **names)
+static int is_option(const char *name, const char *const *names)
 {
-       const char **p;
+       const char *const *p;
 
        for (p = names; p && *p; p++) {
                if (strcmp(name, *p) == 0)
@@ -141,7 +141,7 @@ static int fix_optstr(struct libmnt_context *cxt)
 
        /* Fix SELinux contexts */
        if (se_rem || se_fix) {
-               static const char *selinux_options[] = {
+               static const char *const selinux_options[] = {
                        "context",
                        "fscontext",
                        "defcontext",
@@ -184,7 +184,7 @@ static int fix_optstr(struct libmnt_context *cxt)
        if (access("/sys/fs/smackfs", F_OK) != 0) {
                struct libmnt_iter itr;
 
-               static const char *smack_options[] = {
+               static const char *const smack_options[] = {
                        "smackfsdef",
                        "smackfsfloor",
                        "smackfshat",