From 4806458dc207d96a37c020325009456c7ee875a3 Mon Sep 17 00:00:00 2001 From: Tomer Shalev Date: Sun, 25 Oct 2009 20:27:38 +0000 Subject: [PATCH] Use ARRAYLEN macro in usb_keymaps.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23351 a1c6a512-1295-4272-9138-f99709370657 --- apps/usb_keymaps.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/usb_keymaps.c b/apps/usb_keymaps.c index f04fa54c3d..ecb40794da 100644 --- a/apps/usb_keymaps.c +++ b/apps/usb_keymaps.c @@ -34,9 +34,6 @@ #define CTRL(key) MODIFIER(HID_KEYBOARD_LEFT_CONTROL, key) #define SHIFT(key) MODIFIER(HID_KEYBOARD_LEFT_SHIFT, key) -#define NUM_KEY_MAPPINGS (sizeof(hid_key_mappings) / \ - sizeof(hid_key_mappings[0])) - typedef struct { int action; @@ -187,7 +184,7 @@ int get_hid_usb_action(void) case ACTION_USB_HID_MODE_SWITCH_PREV: /* Switch key mappings in a cyclic way */ usb_keypad_mode = clamp_value_wrap(usb_keypad_mode + step, - NUM_KEY_MAPPINGS - 1, 0); + ARRAYLEN(hid_key_mappings) - 1, 0); break; default: {