]> git.ozlabs.org Git - ccan/blobdiff - ccan/alloc/test/run.c
alloc: dont clash with libc's fls, avoid void pointer arithmetic
[ccan] / ccan / alloc / test / run.c
index a6d021ff9e5dc87b3d1f25cf821fc15215031208..d5b40c8c3708d13a1c138f902d596ba1d8f40691 100644 (file)
@@ -11,7 +11,7 @@
 
 static int addr_cmp(void **a, void **b)
 {
-       return (*a) - (*b);
+       return (char *)(*a) - (char *)(*b);
 }
 
 static bool unique(void *p[], unsigned int num)