[vlc-devel] [PATCH 2/9] vlc_list: use vlc_list_node on the actual nodes

Steve Lhomme robux4 at ycbcr.xyz
Fri Aug 17 15:04:34 CEST 2018


And tell which list is doing the intrusion in this structure.
---
 include/vlc_input_item.h          | 2 +-
 src/input/es_out.c                | 4 ++--
 src/misc/variables.h              | 2 +-
 src/network/httpd.c               | 6 +++---
 src/playlist/services_discovery.c | 2 +-
 src/test/list.c                   | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h
index 38cc0e82c2..655a934195 100644
--- a/include/vlc_input_item.h
+++ b/include/vlc_input_item.h
@@ -44,7 +44,7 @@ struct info_t
 {
     char *psz_name;            /**< Name of this info */
     char *psz_value;           /**< Value of the info */
-    struct vlc_list node;
+    vlc_list_node node;        /* from list info_category_t.infos */
 };
 
 #define info_foreach(info, cat) vlc_list_foreach(info, cat, node)
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 000cad3f97..588b9adcdb 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -73,7 +73,7 @@ typedef struct
     input_clock_t *p_input_clock;
 
     vlc_meta_t *p_meta;
-    struct vlc_list node;
+    vlc_list_node node;    /* from list es_out_sys_t.programs */
 } es_out_pgrm_t;
 
 struct es_out_id_t
@@ -109,7 +109,7 @@ struct es_out_id_t
     /* ID for the meta data */
     int         i_meta_id;
 
-    struct vlc_list node;
+    vlc_list_node node;    /* from list es_out_sys_t.es/es_slaves */
 
     vlc_mouse_event mouse_event_cb;
     void* mouse_event_userdata;
diff --git a/src/misc/variables.h b/src/misc/variables.h
index 21e403ea13..c986906cd1 100644
--- a/src/misc/variables.h
+++ b/src/misc/variables.h
@@ -49,7 +49,7 @@ struct vlc_object_internals
     vlc_destructor_t pf_destructor;
 
     /* Objects tree structure */
-    struct vlc_list siblings;  /**< Siblings list node */
+    vlc_list_node   siblings; /**< Siblings list node, from list 'children' */
     struct vlc_list children; /**< Children list */
     vlc_mutex_t tree_lock;
 
diff --git a/src/network/httpd.c b/src/network/httpd.c
index 3d7ae0405d..04151b01fb 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -76,7 +76,7 @@ static void httpd_AppendData(httpd_stream_t *stream, uint8_t *p_data, int i_data
 struct httpd_host_t
 {
     struct vlc_common_members obj;
-    struct vlc_list node;
+    vlc_list_node node; /* from list httpd.hosts */
 
     /* ref count */
     atomic_uint ref;
@@ -107,7 +107,7 @@ struct httpd_host_t
 struct httpd_url_t
 {
     httpd_host_t *host;
-    struct vlc_list node;
+    vlc_list_node node;  /* from list httpd_host_t.urls */
     vlc_mutex_t lock;
 
     char      *psz_url;
@@ -143,7 +143,7 @@ struct httpd_client_t
     httpd_url_t *url;
     vlc_tls_t   *sock;
 
-    struct vlc_list node;
+    vlc_list_node node;  /* from list httpd_host_t.clients */
 
     bool    b_stream_mode;
     uint8_t i_state;
diff --git a/src/playlist/services_discovery.c b/src/playlist/services_discovery.c
index 0cc7298667..bff6fc9715 100644
--- a/src/playlist/services_discovery.c
+++ b/src/playlist/services_discovery.c
@@ -35,7 +35,7 @@ typedef struct vlc_sd_internal_t
     /* the playlist items for category and onelevel */
     playlist_item_t      *node;
     services_discovery_t *sd; /**< Loaded service discovery modules */
-    struct vlc_list       siblings;
+    vlc_list_node        siblings;  /* from list playlist_private_t.sds */
     char name[];
 } vlc_sd_internal_t;
 
diff --git a/src/test/list.c b/src/test/list.c
index 583adc1f0d..c85a7935cd 100644
--- a/src/test/list.c
+++ b/src/test/list.c
@@ -34,7 +34,7 @@
 struct test_elem
 {
     int i;
-    struct vlc_list node;
+    vlc_list_node node;
 };
 
 static struct vlc_list *make_elem(int i)
-- 
2.17.0



More information about the vlc-devel mailing list