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, ...) ...@@ -409,19 +409,14 @@ static int vlc_plugin_setter (void *plugin, void *tgt, int propid, ...)
/* Copy textual descriptions */ /* Copy textual descriptions */
const char *const *text = va_arg (ap, const char *const *); 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)); for (size_t i = 0; i < len; i++)
if( dtext != NULL ) dtext[i] = text[i] ? strdup (text[i]) : NULL;
{ dtext[len] = 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;
} }
else item->ppsz_list_text = dtext;
item->ppsz_list_text = NULL;
item->i_list = len; item->i_list = len;
item->pf_update_list = va_arg (ap, vlc_callback_t); 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