Apparently it's impolite to ask GCC to subtract two pointers.
[oweals/tinc.git] / src / connection.c
index 66eb0596bdc41bf4fb0c4518611a724d1aa1c4da..283ebd7127d2462a8cc3ff3b3ddedf3347f659b6 100644 (file)
@@ -37,7 +37,7 @@ connection_t *broadcast;
 
 static int connection_compare(const connection_t *a, const connection_t *b)
 {
-       return a - b;
+       return a < b ? -1 : a == b ? 0 : 1;
 }
 
 void init_connections(void)