]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cmd: Use 'const' for static string constant.
authorTobin C. Harding <me@tobin.cc>
Fri, 17 Aug 2018 06:05:14 +0000 (16:05 +1000)
committerTobin C. Harding <me@tobin.cc>
Fri, 17 Aug 2018 06:10:08 +0000 (16:10 +1000)
checkpatch emits warning:

WARNING: static char array declaration should probably be static const char

Use 'const' for static string constant (array of chars).

Signed-off-by: Tobin C. Harding <me@tobin.cc>
src/lxc/cmd/lxc_init.c

index c845f6ae28ae2bd9528807216b77ec5c91a683fc..c5e46a1cd96c646c35e1c607425a1b34aa6ac611 100644 (file)
@@ -73,7 +73,7 @@ static struct option long_options[] = {
            { "lxcpath",     required_argument, 0, 'P'         },
            { 0,             0,                 0, 0           }
        };
-static char short_options[] = "n:hqo:l:P:";
+static const char short_options[] = "n:hqo:l:P:";
 
 struct arguments {
        const struct option *options;