]> git.proxmox.com Git - qemu.git/commitdiff
linux-user: arg_table need not have global scope
authorJim Meyering <meyering@redhat.com>
Mon, 21 May 2012 19:56:19 +0000 (21:56 +0200)
committerRiku Voipio <riku.voipio@linaro.org>
Mon, 27 Aug 2012 07:13:17 +0000 (10:13 +0300)
Declare arg_table to be "static const", and adjust the two users
to also be const.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/main.c

index 7dea084873e3c0d4e0c8560ac60c8d05cdb90c87..b1c228a249a29e6d42f838bbc9a98b5830112a91 100644 (file)
@@ -3222,7 +3222,7 @@ struct qemu_argument {
     const char *help;
 };
 
-struct qemu_argument arg_table[] = {
+static const struct qemu_argument arg_table[] = {
     {"h",          "",                 false, handle_arg_help,
      "",           "print this help"},
     {"g",          "QEMU_GDB",         true,  handle_arg_gdb,
@@ -3264,7 +3264,7 @@ struct qemu_argument arg_table[] = {
 
 static void usage(void)
 {
-    struct qemu_argument *arginfo;
+    const struct qemu_argument *arginfo;
     int maxarglen;
     int maxenvlen;
 
@@ -3330,7 +3330,7 @@ static int parse_args(int argc, char **argv)
 {
     const char *r;
     int optind;
-    struct qemu_argument *arginfo;
+    const struct qemu_argument *arginfo;
 
     for (arginfo = arg_table; arginfo->handle_opt != NULL; arginfo++) {
         if (arginfo->env == NULL) {