[vlc-commits] Fix sizeof mismatch (cid #1049623 and #1049622)
Rémi Duraffort
git at videolan.org
Fri Jul 19 21:12:51 CEST 2013
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Jul 19 20:55:30 2013 +0200| [32b1c86c27167e7e312af682b19be63bf822638a] | committer: Rémi Duraffort
Fix sizeof mismatch (cid #1049623 and #1049622)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32b1c86c27167e7e312af682b19be63bf822638a
---
src/modules/entry.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/entry.c b/src/modules/entry.c
index 2f63868..3bb312e 100644
--- a/src/modules/entry.c
+++ b/src/modules/entry.c
@@ -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 */
@@ -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;
More information about the vlc-commits
mailing list