mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-01-06 01:41:15 +00:00
Use memset instead of explicit initialization for port states.
This commit is contained in:
parent
f4c5590edf
commit
4a047726e2
1 changed files with 1 additions and 7 deletions
|
@ -1049,7 +1049,6 @@ static fluid_ladspa_plugin_t *
|
||||||
new_fluid_ladspa_plugin(fluid_ladspa_fx_t *fx, const fluid_ladspa_lib_t *lib, const char *name)
|
new_fluid_ladspa_plugin(fluid_ladspa_fx_t *fx, const fluid_ladspa_lib_t *lib, const char *name)
|
||||||
{
|
{
|
||||||
fluid_ladspa_plugin_t *plugin;
|
fluid_ladspa_plugin_t *plugin;
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
plugin = FLUID_NEW(fluid_ladspa_plugin_t);
|
plugin = FLUID_NEW(fluid_ladspa_plugin_t);
|
||||||
if (plugin == NULL)
|
if (plugin == NULL)
|
||||||
|
@ -1081,12 +1080,7 @@ new_fluid_ladspa_plugin(fluid_ladspa_fx_t *fx, const fluid_ladspa_lib_t *lib, co
|
||||||
FLUID_LOG(FLUID_ERR, "Out of memory");
|
FLUID_LOG(FLUID_ERR, "Out of memory");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
FLUID_MEMSET(plugin->ports, 0, plugin->desc->PortCount * sizeof(fluid_ladspa_port_state_t));
|
||||||
for (i = 0; i < plugin->desc->PortCount; i++)
|
|
||||||
{
|
|
||||||
plugin->ports[i].num_inputs = 0;
|
|
||||||
plugin->ports[i].num_outputs = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return plugin;
|
return plugin;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue