From: RĂ©mi Duraffort Date: Wed, 14 Jul 2010 17:02:17 +0000 (+0200) Subject: modules: remove an unused define and assert if we try to add too many shortcuts. X-Git-Tag: 1.2.0-pre1~5838 X-Git-Url: https://git.sesse.net/?p=vlc;a=commitdiff_plain;h=d56e311e7c89f128a4b9e69872231e97b2ac36e2 modules: remove an unused define and assert if we try to add too many shortcuts. In fact the cache loader does only load less than MODULE_SHORTCUT_MAX shortcuts. --- diff --git a/src/modules/entry.c b/src/modules/entry.c index df7277bd5d..cf99b081ad 100644 --- a/src/modules/entry.c +++ b/src/modules/entry.c @@ -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)); diff --git a/src/modules/modules.h b/src/modules/modules.h index a566019ffd..60b00eee01 100644 --- a/src/modules/modules.h +++ b/src/modules/modules.h @@ -28,10 +28,6 @@ #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 *****************************************************************************