From: Tobin C. Harding Date: Fri, 17 Aug 2018 06:05:14 +0000 (+1000) Subject: cmd: Use 'const' for static string constant. X-Git-Tag: lxc-3.1.0~155^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f5700e6aaf8dc15dbf2efe2039eda17cfbe9708;p=thirdparty%2Flxc.git cmd: Use 'const' for static string constant. 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 --- diff --git a/src/lxc/cmd/lxc_init.c b/src/lxc/cmd/lxc_init.c index c845f6ae2..c5e46a1cd 100644 --- a/src/lxc/cmd/lxc_init.c +++ b/src/lxc/cmd/lxc_init.c @@ -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;