summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-05-21 21:56:19 +0200
committerRiku Voipio <riku.voipio@linaro.org>2012-08-27 10:13:17 +0300
commit42644cee08f85202f5d3e8babf6503487849353a (patch)
tree43a4661ce5cff512cb6617c34cf278d30506d980
parentd03c98d80ffb7c561d9e6874580f52fe7ecc8c6c (diff)
downloadqemu-42644cee08f85202f5d3e8babf6503487849353a.zip
linux-user: arg_table need not have global scope
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>
-rw-r--r--linux-user/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 7dea084873..b1c228a249 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -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) {