From patchwork Mon May 21 19:56:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Meyering X-Patchwork-Id: 160464 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AB4CEB6F62 for ; Tue, 22 May 2012 06:17:58 +1000 (EST) Received: from localhost ([::1]:34194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWYjW-0003Vr-0l for incoming@patchwork.ozlabs.org; Mon, 21 May 2012 15:57:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWYim-0001TJ-QX for qemu-devel@nongnu.org; Mon, 21 May 2012 15:56:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWYil-0006k8-3m for qemu-devel@nongnu.org; Mon, 21 May 2012 15:56:48 -0400 Received: from mx.meyering.net ([88.168.87.75]:37747 helo=hx.meyering.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWYik-0006jb-K6 for qemu-devel@nongnu.org; Mon, 21 May 2012 15:56:47 -0400 Received: from hx.meyering.net (hx.meyering.net [127.0.0.1]) by hx.meyering.net (8.14.5/8.14.5) with ESMTP id q4LJuamF030647; Mon, 21 May 2012 21:56:36 +0200 Received: (from meyering@localhost) by hx.meyering.net (8.14.5/8.14.5/Submit) id q4LJuZAu030646; Mon, 21 May 2012 21:56:35 +0200 From: Jim Meyering To: qemu-devel@nongnu.org Date: Mon, 21 May 2012 21:56:19 +0200 Message-Id: <1337630184-30581-2-git-send-email-jim@meyering.net> X-Mailer: git-send-email 1.7.10.2.552.gaa3bb87 In-Reply-To: <1337630184-30581-1-git-send-email-jim@meyering.net> References: <1337629910-30302-1-git-send-email-jim@meyering.net> <1337630184-30581-1-git-send-email-jim@meyering.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 88.168.87.75 Cc: Jim Meyering , Riku Voipio Subject: [Qemu-devel] [PATCH 4/9] linux-user: arg_table need not have global scope X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jim Meyering Declare arg_table to be "static const", and adjust the two users to also be const. Signed-off-by: Jim Meyering --- 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) {