summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjinwoo.shin <jw0227.shin@samsung.com>2015-09-18 19:11:12 +0900
committerjinwoo.shin <jw0227.shin@samsung.com>2015-09-18 19:11:12 +0900
commitc580e3fc89378fc0cf395f67fd360f10332b1304 (patch)
treee9a60ab7bc6b644c7204d6d5050f2811fc6d21d4
parent730ebf24ebca441310443f6dfe7541bfedb663f3 (diff)
downloadair_livetv-c580e3fc89378fc0cf395f67fd360f10332b1304.tar.gz
air_livetv-c580e3fc89378fc0cf395f67fd360f10332b1304.tar.bz2
air_livetv-c580e3fc89378fc0cf395f67fd360f10332b1304.zip
Fix wrong while statement
Change-Id: Ib939327c8281d5c6af517f80aa146bf08430b14d Signed-off-by: jinwoo.shin <jw0227.shin@samsung.com>
-rw-r--r--src/view_action_menu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/view_action_menu.c b/src/view_action_menu.c
index 10362f1..76265fe 100644
--- a/src/view_action_menu.c
+++ b/src/view_action_menu.c
@@ -457,7 +457,7 @@ static void _update_menu(struct _priv *priv)
int i;
i = 0;
- while (buttons[i].id != BUTTON_INVALID && i < BUTTON_MAX) {
+ while (i < BUTTON_MAX && buttons[i].id != BUTTON_INVALID) {
_update_button_state(priv->menu_btn[i], &buttons[i]);
i++;
}
@@ -495,7 +495,7 @@ static bool _draw_action_area(struct _priv *priv)
elm_object_part_content_set(priv->menu, PART_MENU, table);
i = 0;
- while (buttons[i].id != BUTTON_INVALID && i < BUTTON_MAX) {
+ while (i < BUTTON_MAX && buttons[i].id != BUTTON_INVALID) {
btn = util_add_button(priv->menu, NULL,
buttons[i].data[UNTOGGLE].text,
buttons[i].style);
@@ -750,7 +750,7 @@ static void _destroy(void *data)
inputmgr_remove_callback(priv->base, &key_handler);
i = 0;
- while (priv->menu_btn[i] && i < BUTTON_MAX) {
+ while (i < BUTTON_MAX && priv->menu_btn[i]) {
inputmgr_remove_callback(priv->menu_btn[i], &button_handler);
i++;
}