Commit 2f3f0899 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

modules: remove unnecessary checks

parent 08399ac4
......@@ -409,19 +409,14 @@ static int vlc_plugin_setter (void *plugin, void *tgt, int propid, ...)
/* Copy textual descriptions */
const char *const *text = va_arg (ap, const char *const *);
if (text != NULL)
char **dtext = malloc (sizeof (char *) * (len + 1));
if( dtext != NULL )
{
char **dtext = malloc (sizeof (char *) * (len + 1));
if( dtext != NULL )
{
for (size_t i = 0; i < len; i++)
dtext[i] = text[i] ? strdup (text[i]) : NULL;
dtext[len] = NULL;
}
item->ppsz_list_text = dtext;
for (size_t i = 0; i < len; i++)
dtext[i] = text[i] ? strdup (text[i]) : NULL;
dtext[len] = NULL;
}
else
item->ppsz_list_text = NULL;
item->ppsz_list_text = dtext;
item->i_list = len;
item->pf_update_list = va_arg (ap, vlc_callback_t);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment