vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Mon Feb 26 
20:34:43 2018 +0200| [779c87eaff8399a3c7f65fe51fcf107c727fc227] | committer: 
Rémi Denis-Courmont

ts: fix invalid casts

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

 modules/demux/mpeg/ts_pid.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/modules/demux/mpeg/ts_pid.c b/modules/demux/mpeg/ts_pid.c
index 2971e942b1..df12dcae97 100644
--- a/modules/demux/mpeg/ts_pid.c
+++ b/modules/demux/mpeg/ts_pid.c
@@ -64,14 +64,16 @@ void ts_pid_list_Release( demux_t *p_demux, ts_pid_list_t 
*p_list )
 struct searchkey
 {
     int16_t i_pid;
-    ts_pid_t **pp_last;
+    ts_pid_t *const *pp_last;
 };
 
-static int ts_bsearch_searchkey_Compare( void *key, void *other )
+static int ts_bsearch_searchkey_Compare( const void *key, const void *other )
 {
-    struct searchkey *p_key = (struct searchkey *) key;
-    ts_pid_t *p_pid = *((ts_pid_t **) other);
-    p_key->pp_last = (ts_pid_t **) other;
+    struct searchkey *p_key = (void *)key;
+    ts_pid_t *const *pp_pid = other;
+
+    ts_pid_t *p_pid = *pp_pid;
+    p_key->pp_last = other;
     return ( p_key->i_pid >= p_pid->i_pid ) ? p_key->i_pid - p_pid->i_pid : -1;
 }
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to