Skip to content

Commit

Permalink
Fix sizeof mismatch (cid #1049623 and #1049622)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivoire committed Jul 19, 2013
1 parent 0c24ccc commit 32b1c86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static int vlc_plugin_setter (void *plugin, void *tgt, int propid, ...)
break;
}
/* Inheritance. Ugly!! */
submodule->pp_shortcuts = xmalloc (sizeof (char **));
submodule->pp_shortcuts = xmalloc (sizeof ( *submodule->pp_shortcuts ));
submodule->pp_shortcuts[0] = strdup_null (module->pp_shortcuts[0]);
submodule->i_shortcuts = 1; /* object name */

Expand Down Expand Up @@ -251,7 +251,7 @@ static int vlc_plugin_setter (void *plugin, void *tgt, int propid, ...)
const char *value = va_arg (ap, const char *);

assert (module->i_shortcuts == 0);
module->pp_shortcuts = malloc( sizeof( char ** ) );
module->pp_shortcuts = malloc( sizeof( *module->pp_shortcuts ) );
module->pp_shortcuts[0] = strdup (value);
module->i_shortcuts = 1;

Expand Down

0 comments on commit 32b1c86

Please sign in to comment.