forked from len0rd/rockbox
Don't use CHECK_VOL(x) as a loop conditional
...On non-multidrive targets it will always evaluate to true because
it effectively ignores the argument passed in.
Instead use 'x < NUM_VOLUMES'
Fixes regression introduced with a41a001258
on non-multivolume devices
Change-Id: I1a620af113c87cf3227ef8b40d0b51b2600cd816
This commit is contained in:
parent
843157e227
commit
10b8448511
1 changed files with 3 additions and 3 deletions
|
@ -172,7 +172,7 @@ static int refresh_data(struct info_data *info)
|
||||||
int special = 0;
|
int special = 0;
|
||||||
#endif
|
#endif
|
||||||
int drive = 0;
|
int drive = 0;
|
||||||
for (i = 0 ; CHECK_VOL(i) ; i++)
|
for (i = 0 ; i < NUM_VOLUMES ; i++)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
volume_size(IF_MV(i,) &info->size[i], &info->free[i]);
|
volume_size(IF_MV(i,) &info->size[i], &info->free[i]);
|
||||||
|
@ -353,7 +353,7 @@ static int info_action_callback(int action, struct gui_synclist *lists)
|
||||||
info->new_data = true;
|
info->new_data = true;
|
||||||
splash(0, ID2P(LANG_SCANNING_DISK));
|
splash(0, ID2P(LANG_SCANNING_DISK));
|
||||||
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
||||||
for (int i = 0; CHECK_VOL(i); i++)
|
for (int i = 0; i < NUM_VOLUMES; i++)
|
||||||
volume_recalc_free(IF_MV(i));
|
volume_recalc_free(IF_MV(i));
|
||||||
#endif
|
#endif
|
||||||
gui_synclist_speak_item(lists);
|
gui_synclist_speak_item(lists);
|
||||||
|
@ -438,7 +438,7 @@ static int info_action_callback(int action, struct gui_synclist *lists)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* INFO_DISK, capacity/free on internal */
|
/* INFO_DISK, capacity/free on internal */
|
||||||
for (int i = 0; CHECK_VOL(i) ; i++) {
|
for (int i = 0; i < NUM_VOLUMES ; i++) {
|
||||||
if (info->size[i]) {
|
if (info->size[i]) {
|
||||||
output_dyn_value(s1, sizeof s1, info->free[i], kibyte_units, 3, true);
|
output_dyn_value(s1, sizeof s1, info->free[i], kibyte_units, 3, true);
|
||||||
output_dyn_value(s2, sizeof s2, info->size[i], kibyte_units, 3, true);
|
output_dyn_value(s2, sizeof s2, info->size[i], kibyte_units, 3, true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue