diff options
author | Alexander Levin <al.le@rockbox.org> | 2010-05-11 17:10:07 +0000 |
---|---|---|
committer | Alexander Levin <al.le@rockbox.org> | 2010-05-11 17:10:07 +0000 |
commit | c79bc8006dcfb0f693b9048ae87d53731ebdf934 (patch) | |
tree | f5457e4febb34ceaeae28ca0b884002c57cb698b | |
parent | c699914c331072ec28f2fb902ac6a488a49371da (diff) |
No need to have a variable for a thing computed by the preprocessor
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25956 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/onplay.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index c1e1887a2a..556da1cde2 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -1246,12 +1246,10 @@ static struct hotkey_assignment hotkey_items[] = { ONPLAY_OK }, }; -static const int num_hotkey_items = sizeof(hotkey_items) / sizeof(hotkey_items[0]); - /* Return the language ID for this action */ int get_hotkey_lang_id(int action) { - int i = num_hotkey_items; + int i = ARRAYLEN(hotkey_items); while (i--) { if (hotkey_items[i].action == action) @@ -1264,7 +1262,7 @@ int get_hotkey_lang_id(int action) /* Execute the hotkey function, if listed */ static int execute_hotkey(bool is_wps) { - int i = num_hotkey_items; + int i = ARRAYLEN(hotkey_items); struct hotkey_assignment *this_item; const int action = (is_wps ? global_settings.hotkey_wps : global_settings.hotkey_tree); |