From beba3693f7243e68bbe31fe3794da91068eeea5b Mon Sep 17 00:00:00 2001 From: Dongli Zhang Date: Fri, 10 Jun 2016 00:02:52 +0800 Subject: [PATCH] tools/livepatch: cleanup unnecessary "j = ARRAY_SIZE(action_options);" 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-livepatch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/misc/xen-livepatch.c b/tools/misc/xen-livepatch.c index 28f339a1a5..316248979c 100644 --- a/tools/misc/xen-livepatch.c +++ b/tools/misc/xen-livepatch.c @@ -435,8 +435,7 @@ int main(int argc, char *argv[]) "'xen-livepatch help'\n", argv[1]); return 1; } - } else - j = ARRAY_SIZE(action_options); + } xch = xc_interface_open(0,0,0); if ( !xch ) -- 2.30.2