[vlc-commits] udev: fix pointer aliasing

Rémi Denis-Courmont git at videolan.org
Sun Oct 27 19:23:58 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 27 20:13:28 2019 +0200| [239be3098317e9056b30ac9244460314e98d20bf] | committer: Rémi Denis-Courmont

udev: fix pointer aliasing

Tree functions return pointers to void pointers.

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

 modules/services_discovery/udev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/services_discovery/udev.c b/modules/services_discovery/udev.c
index 752b5d2cbc..cda59f3774 100644
--- a/modules/services_discovery/udev.c
+++ b/modules/services_discovery/udev.c
@@ -187,7 +187,7 @@ static int AddDevice (services_discovery_t *sd, struct udev_device *dev)
     d->item = item;
     d->sd = NULL;
 
-    struct device **dp = tsearch (d, &p_sys->root, cmpdev);
+    void **dp = tsearch (d, &p_sys->root, cmpdev);
     if (dp == NULL) /* Out-of-memory */
     {
         DestroyDevice (d);
@@ -212,7 +212,7 @@ static void RemoveDevice (services_discovery_t *sd, struct udev_device *dev)
     services_discovery_sys_t *p_sys = sd->p_sys;
 
     dev_t num = udev_device_get_devnum (dev);
-    struct device **dp = tfind (&(dev_t){ num }, &p_sys->root, cmpdev);
+    void **dp = tfind (&(dev_t){ num }, &p_sys->root, cmpdev);
     if (dp == NULL)
         return;
 



More information about the vlc-commits mailing list