]> www.tinc-vpn.org Git - tinc/blobdiff - src/event.c
Add tests for network commands
[tinc] / src / event.c
index 56d8fa97e50294f28b2a5a21573694ede5c7d99d..05ddb47fb4031aff06ffb1c83278583e9ecff588 100644 (file)
@@ -60,11 +60,14 @@ static int timeout_compare(const timeout_t *a, const timeout_t *b) {
                return 1;
        }
 
-       if(a < b) {
+       uintptr_t ap = (uintptr_t)a;
+       uintptr_t bp = (uintptr_t)b;
+
+       if(ap < bp) {
                return -1;
        }
 
-       if(a > b) {
+       if(ap > bp) {
                return 1;
        }