summaryrefslogtreecommitdiffstats
path: root/apps/playback.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2017-12-04 12:59:15 -0500
committerMichael Sevakis <jethead71@rockbox.org>2017-12-04 12:59:15 -0500
commitbef75a94f8eb3432c96356541c0162e7a6c650fa (patch)
tree8bbcd132937b35f1f9e7cd2476b20e77467b4b5e /apps/playback.c
parent055e2115de90893b01c8214cee805ae5fd669a7c (diff)
downloadrockbox-bef75a94f8eb3432c96356541c0162e7a6c650fa.tar.gz
rockbox-bef75a94f8eb3432c96356541c0162e7a6c650fa.tar.bz2
rockbox-bef75a94f8eb3432c96356541c0162e7a6c650fa.zip
Playback: C99-ize FOREACH_ALBUMART; make loop counter local
Change-Id: Ie6d571ef217246e22b465ef39097ad9d9d1a6436
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 28e520319d..d48fd39fb8 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -174,7 +174,7 @@ static struct albumart_slot
int used; /* Counter; increments if something uses it */
} albumart_slots[MAX_MULTIPLE_AA]; /* (A,O) */
-#define FOREACH_ALBUMART(i) for(i = 0;i < MAX_MULTIPLE_AA; i++)
+#define FOREACH_ALBUMART(i) for (int i = 0; i < MAX_MULTIPLE_AA; i++)
#endif /* HAVE_ALBUMART */
@@ -465,7 +465,6 @@ static void track_info_close(struct track_info *info)
track_info_close_handle(&info->id3_hid);
track_info_close_handle(&info->cuesheet_hid);
#ifdef HAVE_ALBUMART
- int i;
FOREACH_ALBUMART(i)
track_info_close_handle(&info->aa_hid[i]);
#endif
@@ -482,7 +481,6 @@ static void track_info_wipe(struct track_info * info)
info->id3_hid = ERR_HANDLE_NOT_FOUND;
info->cuesheet_hid = ERR_HANDLE_NOT_FOUND;
#ifdef HAVE_ALBUMART
- int i;
FOREACH_ALBUMART(i)
info->aa_hid[i] = ERR_HANDLE_NOT_FOUND;
#endif
@@ -1609,7 +1607,6 @@ static bool audio_load_cuesheet(struct track_info *info,
static bool audio_load_albumart(struct track_info *info,
struct mp3entry *track_id3)
{
- int i;
FOREACH_ALBUMART(i)
{
struct bufopen_bitmap_data user_data;
@@ -3588,8 +3585,6 @@ int playback_current_aa_hid(int slot)
is already claimed - increment the use count if it is */
int playback_claim_aa_slot(struct dim *dim)
{
- int i;
-
/* First try to find a slot already having the size to reuse it since we
don't want albumart of the same size buffered multiple times */
FOREACH_ALBUMART(i)