From d56e311e7c89f128a4b9e69872231e97b2ac36e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Wed, 14 Jul 2010 19:02:17 +0200 Subject: [PATCH] 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. --- src/modules/entry.c | 3 +++ src/modules/modules.h | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) 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 ***************************************************************************** -- 2.39.2