Rename p in load_pgen to preset_list

This commit is contained in:
Marcus Weseloh 2021-03-14 21:24:25 +01:00
parent 9e7c108f4c
commit 8df5abf903

View file

@ -1368,7 +1368,8 @@ static int load_pmod(SFData *sf, int size)
* ------------------------------------------------------------------- */ * ------------------------------------------------------------------- */
static int load_pgen(SFData *sf, int size) static int load_pgen(SFData *sf, int size)
{ {
fluid_list_t *p, *dup, **hz = NULL; fluid_list_t *dup, **hz = NULL;
fluid_list_t *preset_list;
fluid_list_t *zone_list; fluid_list_t *zone_list;
fluid_list_t *gen_list; fluid_list_t *gen_list;
SFZone *z; SFZone *z;
@ -1377,14 +1378,14 @@ static int load_pgen(SFData *sf, int size)
unsigned short genid; unsigned short genid;
int level, skip, drop, gzone, discarded; int level, skip, drop, gzone, discarded;
p = sf->preset; preset_list = sf->preset;
while(p) while(preset_list)
{ {
/* traverse through all presets */ /* traverse through all presets */
gzone = FALSE; gzone = FALSE;
discarded = FALSE; discarded = FALSE;
zone_list = ((SFPreset *)(p->data))->zone; zone_list = ((SFPreset *)(preset_list->data))->zone;
if(zone_list) if(zone_list)
{ {
@ -1523,7 +1524,7 @@ static int load_pgen(SFData *sf, int size)
{ {
void *save = zone_list->data; void *save = zone_list->data;
FLUID_LOG(FLUID_WARN, "Preset '%s': Global zone is not first zone", FLUID_LOG(FLUID_WARN, "Preset '%s': Global zone is not first zone",
((SFPreset *)(p->data))->name); ((SFPreset *)(preset_list->data))->name);
SLADVREM(*hz, zone_list); SLADVREM(*hz, zone_list);
*hz = fluid_list_prepend(*hz, save); *hz = fluid_list_prepend(*hz, save);
continue; continue;
@ -1533,7 +1534,7 @@ static int load_pgen(SFData *sf, int size)
{ {
/* previous global zone exists, discard */ /* previous global zone exists, discard */
FLUID_LOG(FLUID_WARN, "Preset '%s': Discarding invalid global zone", FLUID_LOG(FLUID_WARN, "Preset '%s': Discarding invalid global zone",
((SFPreset *)(p->data))->name); ((SFPreset *)(preset_list->data))->name);
*hz = fluid_list_remove(*hz, zone_list->data); *hz = fluid_list_remove(*hz, zone_list->data);
delete_zone((SFZone *)fluid_list_get(zone_list)); delete_zone((SFZone *)fluid_list_get(zone_list));
} }
@ -1561,10 +1562,10 @@ static int load_pgen(SFData *sf, int size)
{ {
FLUID_LOG(FLUID_WARN, FLUID_LOG(FLUID_WARN,
"Preset '%s': Some invalid generators were discarded", "Preset '%s': Some invalid generators were discarded",
((SFPreset *)(p->data))->name); ((SFPreset *)(preset_list->data))->name);
} }
p = fluid_list_next(p); preset_list = fluid_list_next(preset_list);
} }
/* in case there isn't a terminal record */ /* in case there isn't a terminal record */