[vlc-commits] config: remove useless parameter from integer list callback

Rémi Denis-Courmont git at videolan.org
Wed Feb 28 20:02:38 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb 28 20:20:54 2018 +0200| [b52de6c530e685aa2387ff38a8b732f74e98f41a] | committer: Rémi Denis-Courmont

config: remove useless parameter from integer list callback

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

 include/vlc_configuration.h       | 3 +--
 modules/video_output/xcb/xvideo.c | 9 ++++-----
 src/config/core.c                 | 2 +-
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index 100ebe92c1..af1b8f0b36 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -66,8 +66,7 @@ typedef union
 
 typedef int (*vlc_string_list_cb)(vlc_object_t *, const char *,
                                   char ***, char ***);
-typedef int (*vlc_integer_list_cb)(vlc_object_t *, const char *,
-                                   int64_t **, char ***);
+typedef int (*vlc_integer_list_cb)(const char *, int64_t **, char ***);
 
 /**
  * Configuration item
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 6c587a808f..0836929fba 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -53,7 +53,7 @@
 
 static int  Open (vlc_object_t *);
 static void Close (vlc_object_t *);
-static int EnumAdaptors (vlc_object_t *, const char *, int64_t **, char ***);
+static int EnumAdaptors(const char *, int64_t **, char ***);
 
 /*
  * Module descriptor
@@ -755,11 +755,10 @@ static int Control (vout_display_t *vd, int query, va_list ap)
     }
 }
 
-static int EnumAdaptors (vlc_object_t *obj, const char *var,
-                         int64_t **vp, char ***tp)
+static int EnumAdaptors(const char *var, int64_t **vp, char ***tp)
 {
     /* Connect to X */
-    char *display = var_InheritString (obj, "x11-display");
+    char *display = config_GetPsz("x11-display");
     xcb_connection_t *conn;
     int snum;
 
@@ -833,6 +832,6 @@ static int EnumAdaptors (vlc_object_t *obj, const char *var,
         *(texts++) = strndup (xcb_xv_adaptor_info_name (a), a->name_size);
     }
     free (adaptors);
-    (void) obj; (void) var;
+    (void) var;
     return values - *vp;
 }
diff --git a/src/config/core.c b/src/config/core.c
index 7e7eb0631f..63abca4647 100644
--- a/src/config/core.c
+++ b/src/config/core.c
@@ -219,7 +219,7 @@ ssize_t config_GetIntChoices (vlc_object_t *obj, const char *name,
 
         if (cfg->list.i_cb == NULL)
             return 0;
-        return cfg->list.i_cb(obj, name, values, texts);
+        return cfg->list.i_cb(name, values, texts);
     }
 
     int64_t *vals = vlc_alloc (count, sizeof (*vals));



More information about the vlc-commits mailing list