diff options
author | Nils Wallménius <nils@rockbox.org> | 2010-02-27 17:46:51 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2010-02-27 17:46:51 +0000 |
commit | 519b3e25b8edfb43444839ee10ed329662fe1551 (patch) | |
tree | 4a1b3f29d09690ee62ff0620529cc2dd0e8c179d /apps/gui | |
parent | 818fcd16b77eec5bd3f849259af0255040c64f23 (diff) |
mark array as const and use ARRAYLEN macro for calculating length of the array
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24946 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/theme_settings.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/gui/theme_settings.c b/apps/gui/theme_settings.c index 23e7a5bbaf..fdc4976968 100644 --- a/apps/gui/theme_settings.c +++ b/apps/gui/theme_settings.c @@ -35,7 +35,6 @@ #include "statusbar-skinned.h" - /* call this after loading a .wps/.rwps or other skin files, so that the * skin buffer is reset properly */ @@ -44,7 +43,8 @@ struct skin_load_setting { char* suffix; void (*loadfunc)(enum screen_type screen, const char *buf, bool isfile); }; -static struct skin_load_setting skins[] = { + +static const struct skin_load_setting skins[] = { /* This determins the load order. *sbs must be loaded before any other * skin on that screen */ #ifdef HAVE_LCD_BITMAP @@ -70,7 +70,7 @@ void settings_apply_skins(void) sb_skin_init(); #endif gui_sync_wps_init(); - for (i=0; i<sizeof(skins)/sizeof(*skins); i++) + for (i=0; i<ARRAYLEN(skins); i++) { #ifdef HAVE_REMOTE_LCD screen = skins[i].suffix[0] == 'r' ? SCREEN_REMOTE : SCREEN_MAIN; |