]> git.sesse.net Git - vlc/commitdiff
modules: remove an unused define and assert if we try to add too many shortcuts.
authorRémi Duraffort <ivoire@videolan.org>
Wed, 14 Jul 2010 17:02:17 +0000 (19:02 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Wed, 14 Jul 2010 17:53:24 +0000 (19:53 +0200)
In fact the cache loader does only load less than MODULE_SHORTCUT_MAX shortcuts.

src/modules/entry.c
src/modules/modules.h

index df7277bd5de06c00b510866bb28f74a18decf912..cf99b081adb8d244619536b1380f8c1cd6d58349 100644 (file)
@@ -189,6 +189,9 @@ int vlc_plugin_set (module_t *module, module_config_t *item, int propid, ...)
         {
             unsigned i_shortcuts = va_arg (ap, unsigned);
             unsigned index = module->i_shortcuts;
+            /* The cache loader accept only a small number of shortcuts */
+            assert(i_shortcuts + index <= MODULE_SHORTCUT_MAX);
+
             const char *const *tab = va_arg (ap, const char *const *);
             const char **pp = realloc (module->pp_shortcuts,
                                        sizeof (pp[0]) * (index + i_shortcuts));
index a566019ffdbf698c3ef7469c670e7d1598c15b7c..60b00eee01a83149e705f696f38019085381b375 100644 (file)
 #ifndef LIBVLC_MODULES_H
 # define LIBVLC_MODULES_H 1
 
-
-/* Number of tries before we unload an unused module */
-#define MODULE_HIDE_DELAY 50
-
 /*****************************************************************************
  * module_bank_t: the module bank
  *****************************************************************************