Commit d56e311e authored by Rémi Duraffort's avatar Rémi Duraffort

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.
parent 7b337cff
...@@ -189,6 +189,9 @@ int vlc_plugin_set (module_t *module, module_config_t *item, int propid, ...) ...@@ -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 i_shortcuts = va_arg (ap, unsigned);
unsigned index = module->i_shortcuts; 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 *const *tab = va_arg (ap, const char *const *);
const char **pp = realloc (module->pp_shortcuts, const char **pp = realloc (module->pp_shortcuts,
sizeof (pp[0]) * (index + i_shortcuts)); sizeof (pp[0]) * (index + i_shortcuts));
......
...@@ -28,10 +28,6 @@ ...@@ -28,10 +28,6 @@
#ifndef LIBVLC_MODULES_H #ifndef LIBVLC_MODULES_H
# define LIBVLC_MODULES_H 1 # 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 * module_bank_t: the module bank
***************************************************************************** *****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment