static const char *str -> static const char str[]

Make all the static constant strings as char arrays, so they can be
fully stored in read-only memory.
This commit is contained in:
Pino Toscano
2016-07-22 13:16:02 +02:00
parent 8689bfa437
commit 8e57268dd4
27 changed files with 29 additions and 29 deletions

View File

@@ -149,7 +149,7 @@ main (int argc, char *argv[])
/* The command line arguments are broadly compatible with (a subset
* of) guestfish. Thus we have to deal mainly with -a, -m and --ro.
*/
static const char *options = "a:c:d:im:no:rvVwx";
static const char options[] = "a:c:d:im:no:rvVwx";
static const struct option long_options[] = {
{ "add", 1, 0, 'a' },
{ "connect", 1, 0, 'c' },

View File

@@ -76,7 +76,7 @@ main (int argc, char *argv[])
{
enum { HELP_OPTION = CHAR_MAX + 1 };
static const char *options = "qvV";
static const char options[] = "qvV";
static const struct option long_options[] = {
{ "fd", 1, 0, 0 },
{ "help", 0, 0, HELP_OPTION },