From: Christian Göttsche Date: Tue, 21 Feb 2023 14:28:45 +0000 (+0100) Subject: libmount: declare array of LSM options const X-Git-Tag: v2.39-rc1~62^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=832ee3d79e36b1e49b07ec841aa1497088e1729b;p=thirdparty%2Futil-linux.git libmount: declare array of LSM options const --- diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c index 7491ec205b..7b897345c6 100644 --- a/libmount/src/context_mount.c +++ b/libmount/src/context_mount.c @@ -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",