[vlc-commits] config: generates modules list if none found

Rémi Denis-Courmont git at videolan.org
Sat Sep 16 00:49:57 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Sep 16 01:45:53 2017 +0300| [08d931d33f5460cab64c4859d2337217413f7f51] | committer: Rémi Denis-Courmont

config: generates modules list if none found

Zero modules (for a capability) is not an error per se. This generates a
valid choice list even if there are no matching modules.

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

 src/config/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/config/core.c b/src/config/core.c
index 4b93834a97..1343966af0 100644
--- a/src/config/core.c
+++ b/src/config/core.c
@@ -357,10 +357,9 @@ static ssize_t config_ListModules (const char *cap, char ***restrict values,
 {
     module_t **list;
     ssize_t n = module_list_cap (&list, cap);
-    if (n <= 0)
+    if (unlikely(n < 0))
     {
         *values = *texts = NULL;
-        module_list_free (list);
         return n;
     }
 



More information about the vlc-commits mailing list