[vlc-commits] modules: move done label before va_end and condition

Alexandre Janniaux git at videolan.org
Tue Aug 18 15:09:20 CEST 2020


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Fri Jul 24 11:20:52 2020 +0200| [6a236d751442d742d94d735de7a73b9979a05ba2] | committer: Alexandre Janniaux

modules: move done label before va_end and condition

Otherwise even a found module will raise a message "no modules found"
and va_end is not called in some cases.

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

 src/modules/modules.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/modules/modules.c b/src/modules/modules.c
index 702931f978..250f44f470 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -275,10 +275,11 @@ module_t *(vlc_module_load)(struct vlc_logger *log, const char *capability,
         }
     }
 
+done:
     va_end (args);
 
     if (module == NULL)
-done:   vlc_debug(log, "no %s modules matched", capability);
+        vlc_debug(log, "no %s modules matched", capability);
 
     free(mods);
     return module;



More information about the vlc-commits mailing list