]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mkswap: make context_string const
authorThomas Weißschuh <thomas@t-8ch.de>
Sat, 7 Jan 2023 14:23:56 +0000 (14:23 +0000)
committerThomas Weißschuh <thomas@t-8ch.de>
Sun, 8 Jan 2023 16:28:48 +0000 (16:28 +0000)
Sometimes context_str() return `const char *`.

disk-utils/mkswap.c

index 6f6d3048a3b2e304634cbd4246c4880bcc51a434..7e21647048e861edcf3d7d63901147cc5b5993d6 100644 (file)
@@ -696,7 +696,8 @@ int main(int argc, char **argv)
 
 #ifdef HAVE_LIBSELINUX
        if (S_ISREG(ctl.devstat.st_mode) && is_selinux_enabled() > 0) {
-               char *context_string, *oldcontext;
+               const char *context_string;
+               char *oldcontext;
                context_t newcontext;
 
                if (fgetfilecon(ctl.fd, &oldcontext) < 0) {