diff options
author | Björn Stenberg <bjorn@haxx.se> | 2011-10-15 19:35:02 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2011-10-15 19:35:02 +0000 |
commit | 0942e2a0f71d809c1d7f2606cbddfa1d4beacb87 (patch) | |
tree | ce2fbdea468cb8223598c546fee765a10660a0b0 /apps/gui/skin_engine/skin_backdrops.c | |
parent | f301ac05f9dd6ace2355fa822bd61d454c2c4f28 (diff) | |
download | rockbox-0942e2a0f71d809c1d7f2606cbddfa1d4beacb87.tar.gz rockbox-0942e2a0f71d809c1d7f2606cbddfa1d4beacb87.zip |
Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_backdrops.c')
-rw-r--r-- | apps/gui/skin_engine/skin_backdrops.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/gui/skin_engine/skin_backdrops.c b/apps/gui/skin_engine/skin_backdrops.c index 4701f51b19..5d98e29128 100644 --- a/apps/gui/skin_engine/skin_backdrops.c +++ b/apps/gui/skin_engine/skin_backdrops.c | |||
@@ -46,10 +46,9 @@ static int current_lcd_backdrop[NB_SCREENS]; | |||
46 | 46 | ||
47 | static int buflib_move_callback(int handle, void* current, void* new) | 47 | static int buflib_move_callback(int handle, void* current, void* new) |
48 | { | 48 | { |
49 | int i; | ||
50 | if (handle == handle_being_loaded) | 49 | if (handle == handle_being_loaded) |
51 | return BUFLIB_CB_CANNOT_MOVE; | 50 | return BUFLIB_CB_CANNOT_MOVE; |
52 | for (i=0; i<NB_BDROPS; i++) | 51 | for (int i=0; i<NB_BDROPS; i++) |
53 | { | 52 | { |
54 | if (backdrops[i].buffer == current) | 53 | if (backdrops[i].buffer == current) |
55 | { | 54 | { |
@@ -65,9 +64,7 @@ static struct buflib_callbacks buflib_ops = {buflib_move_callback, NULL}; | |||
65 | static bool first_go = true; | 64 | static bool first_go = true; |
66 | void skin_backdrop_init(void) | 65 | void skin_backdrop_init(void) |
67 | { | 66 | { |
68 | int i; | 67 | for (int i=0; i<NB_BDROPS; i++) |
69 | |||
70 | for (i=0; i<NB_BDROPS; i++) | ||
71 | { | 68 | { |
72 | if (first_go) | 69 | if (first_go) |
73 | backdrops[i].buflib_handle = -1; | 70 | backdrops[i].buflib_handle = -1; |