From: Dongli Zhang Date: Thu, 9 Jun 2016 16:02:52 +0000 (+0800) Subject: tools/livepatch: cleanup unnecessary "j = ARRAY_SIZE(action_options);" X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~971 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=beba3693f7243e68bbe31fe3794da91068eeea5b;p=xen.git 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 --- 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 )