From patchwork Mon May 30 01:46:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongli Zhang X-Patchwork-Id: 9140073 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F1C4460467 for ; Mon, 30 May 2016 01:47:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D751521BED for ; Mon, 30 May 2016 01:47:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB91528185; Mon, 30 May 2016 01:47:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 46CBA21BED for ; Mon, 30 May 2016 01:47:29 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7CGp-0000Lh-Te; Mon, 30 May 2016 01:45:31 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7CGo-0000LZ-IO for xen-devel@lists.xen.org; Mon, 30 May 2016 01:45:30 +0000 Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id FF/E7-31933-93B9B475; Mon, 30 May 2016 01:45:29 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrILMWRWlGSWpSXmKPExsXSO6nOVddytne 4wcGzXBZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8bp15uYCx6xVkz8+YS1gfEQSxcjF4eQQBuT xOGXh5ghnC+MEhff9DBBOBsZJX7tngmV6WaU2LdoPVCGk4NNQEdi2oFTLCC2iIC0xLXPlxlBb GaBXIl3W9ewgdjCApESe46sYgaxWQRUJRZu/QtWwyvgLtF54xlYr4SAnMTJY5NZIWxDidMPtz FOYORZwMiwilGjOLWoLLVI19BAL6koMz2jJDcxMwfIM9bLTS0uTkxPzUlMKtZLzs/dxAj0fj0 DA+MOxm1dzocYJTmYlER53Ti8w4X4kvJTKjMSizPii0pzUosPMcpwcChJ8GbPAsoJFqWmp1ak ZeYAwxAmLcHBoyTCywKS5i0uSMwtzkyHSJ1i1OVY8OP2WiYhlrz8vFQpcV5LkCIBkKKM0jy4E bCYuMQoKyXMy8jAwCDEU5BalJtZgir/ilGcg1FJmDcQZApPZl4J3KZXQEcwAR1hds4L5IiSRI SUVANjgVrl3CZbYXnVzRaWUxhPez+YxOQde2Xfn1ed+3LPS1V+UbkX8V93G3eogO/qade49H+ oFa/iX9zFueTl4cnaZx/lBrCdnzLj/Td3Qyvr6tUXV7w/FmP2R7fEvr4qUE86sOue06z3zTc1 GUXF0zcKiEf1Sle0ba79POOQ3d1AxeuqOX87jksrsRRnJBpqMRcVJwIAOHi6AYQCAAA= X-Env-Sender: dongli.zhang@oracle.com X-Msg-Ref: server-9.tower-31.messagelabs.com!1464572727!6022742!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 53753 invoked from network); 30 May 2016 01:45:28 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-9.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 30 May 2016 01:45:28 -0000 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u4U1jNCm011269 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 May 2016 01:45:24 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u4U1jNGw002532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 May 2016 01:45:23 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u4U1jLd5011051; Mon, 30 May 2016 01:45:22 GMT Received: from linux.cn.oracle.com (/10.182.70.252) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 29 May 2016 18:45:21 -0700 From: Dongli Zhang To: xen-devel@lists.xen.org Date: Mon, 30 May 2016 09:46:02 +0800 Message-Id: <1464572762-12143-1-git-send-email-dongli.zhang@oracle.com> X-Mailer: git-send-email 1.9.1 X-Source-IP: userv0021.oracle.com [156.151.31.71] Cc: ross.lagerwall@citrix.com, ian.jackson@eu.citrix.com, wei.liu2@citrix.com Subject: [Xen-devel] [PATCH 1/1] tools/xsplice: cleanup unnecessary "j = ARRAY_SIZE(action_options); " X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Local variable "j" would be used only when "i == ARRAY_SIZE(main_options)" is true. Thus, it is not necessary to update "j" when "i == ARRAY_SIZE(main_options)" is false. Signed-off-by: Dongli Zhang Reviewed-by: Konrad Rzeszutek Wilk --- tools/misc/xen-xsplice.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c index ddaa079..811dc57 100644 --- a/tools/misc/xen-xsplice.c +++ b/tools/misc/xen-xsplice.c @@ -435,8 +435,7 @@ int main(int argc, char *argv[]) "'xen-xsplice help'\n", argv[1]); return 1; } - } else - j = ARRAY_SIZE(action_options); + } xch = xc_interface_open(0,0,0); if ( !xch )