[vlc-commits] udev: flawed logic

Rémi Denis-Courmont git at videolan.org
Tue Apr 22 23:23:47 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 23 00:23:41 2014 +0300| [41de9cd3000b9bb8474c901ce4e6e84a20cd7943] | committer: Rémi Denis-Courmont

udev: flawed logic

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

 modules/services_discovery/udev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/services_discovery/udev.c b/modules/services_discovery/udev.c
index 48050c5..e70f5c6 100644
--- a/modules/services_discovery/udev.c
+++ b/modules/services_discovery/udev.c
@@ -140,7 +140,7 @@ static int cmpdev (const void *a, const void *b)
     dev_t delta = *da - *db;
 
     if (sizeof (delta) > sizeof (int))
-        return delta ? ((delta > 0) ? 1 : -1) : 0;
+        return delta ? (((signed)delta > 0) ? 1 : -1) : 0;
     return (signed)delta;
 }
 



More information about the vlc-commits mailing list