[vlc-devel] [PATCH 7/7] config: simplify keycmp

Felix Abecassis felix.abecassis at gmail.com
Tue May 6 19:08:31 CEST 2014


Fix potential unsigned overflow.
---
 src/config/keys.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/config/keys.c b/src/config/keys.c
index dac96e7..46b206a 100644
--- a/src/config/keys.c
+++ b/src/config/keys.c
@@ -385,11 +385,7 @@ static int keycmp (const void *a, const void *b)
 {
     const struct mapping *ka = a, *kb = b;
 
-#if (INT_MAX >= 0x7fffffff)
-    return ka->key - kb->key;
-#else
     return (ka->key < kb->key) ? -1 : (ka->key > kb->key) ? +1 : 0;
-#endif
 }
 
 struct vlc_actions
-- 
1.9.1




More information about the vlc-devel mailing list