[vlc-commits] commit: modules: remove an unused define and assert if we try to add too many shortcuts. ( Rémi Duraffort )

git at videolan.org git at videolan.org
Wed Jul 14 19:59:43 CEST 2010


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Jul 14 19:02:17 2010 +0200| [d56e311e7c89f128a4b9e69872231e97b2ac36e2] | committer: 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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d56e311e7c89f128a4b9e69872231e97b2ac36e2
---

 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 df7277b..cf99b08 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 a566019..60b00ee 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
  *****************************************************************************



More information about the vlc-commits mailing list