From 9f59e9fc36fb0b1efba1da06303c09c18e753934 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 14 Dec 2011 12:05:26 +0100 Subject: [PATCH] * grub-core/gfxmenu/gui_list.c (draw_menu): Don't use set in if. --- ChangeLog | 4 ++++ grub-core/gfxmenu/gui_list.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ba8b3004..6c69ba780 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-12-14 Vladimir Serbinenko + + * grub-core/gfxmenu/gui_list.c (draw_menu): Don't use set in if. + 2011-12-14 Vladimir Serbinenko * include/grub/efi/api.h (grub_efi_memory_descriptor): Add packed diff --git a/grub-core/gfxmenu/gui_list.c b/grub-core/gfxmenu/gui_list.c index 2ff6e0f97..1982d9a40 100644 --- a/grub-core/gfxmenu/gui_list.c +++ b/grub-core/gfxmenu/gui_list.c @@ -245,6 +245,7 @@ draw_menu (list_impl_t self, int num_shown_items) visible_index++, menu_index++) { int is_selected = (menu_index == self->view->selected); + struct grub_video_bitmap *icon; if (is_selected) { @@ -256,8 +257,8 @@ draw_menu (list_impl_t self, int num_shown_items) item_top - sel_toppad); } - struct grub_video_bitmap *icon; - if ((icon = get_item_icon (self, menu_index)) != 0) + icon = get_item_icon (self, menu_index); + if (icon != 0) grub_video_blit_bitmap (icon, GRUB_VIDEO_BLIT_BLEND, sel_leftpad, item_top + (item_height - self->icon_height) / 2,