[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/9] linux-user: arg_table need not have global scop
From: |
Jim Meyering |
Subject: |
[Qemu-devel] [PATCH 4/9] linux-user: arg_table need not have global scope |
Date: |
Mon, 21 May 2012 21:56:19 +0200 |
From: Jim Meyering <address@hidden>
Declare arg_table to be "static const", and adjust the two users
to also be const.
Signed-off-by: Jim Meyering <address@hidden>
---
linux-user/main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/linux-user/main.c b/linux-user/main.c
index 191b750..cc5b54b 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3133,7 +3133,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,
@@ -3175,7 +3175,7 @@ struct qemu_argument arg_table[] = {
static void usage(void)
{
- struct qemu_argument *arginfo;
+ const struct qemu_argument *arginfo;
int maxarglen;
int maxenvlen;
@@ -3241,7 +3241,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) {
--
1.7.10.2.552.gaa3bb87
- [Qemu-devel] [PATCH 1/9] ccid: declare DEFAULT_ATR table to be "static const", (continued)
- [Qemu-devel] [PATCH 3/9] alpha-dis: remove unused global; declare others to be static, Jim Meyering, 2012/05/21
- [Qemu-devel] [PATCH 3/9] alpha-dis: remove unused global; declare others to be static, Jim Meyering, 2012/05/21
- [Qemu-devel] [PATCH 6/9] sheepdog: declare bdrv_sheepdog to be static, Jim Meyering, 2012/05/21
- [Qemu-devel] [PATCH 5/9] ccid: make backend_enum_table "static const" and adjust users, Jim Meyering, 2012/05/21
- [Qemu-devel] [PATCH 4/9] linux-user: arg_table need not have global scope,
Jim Meyering <=
- [Qemu-devel] [PATCH 7/9] mips-dis: declare four globals to be "static", Jim Meyering, 2012/05/21
- [Qemu-devel] [PATCH 8/9] bonito: declare bonito_state to be static, Jim Meyering, 2012/05/21
- [Qemu-devel] [PATCH 9/9] convert many more globals to static, Jim Meyering, 2012/05/21