]> git.lizzy.rs Git - dragonstd.git/blobdiff - test/test_tree.c
Use void pointers for callback args
[dragonstd.git] / test / test_tree.c
index dbe98998d09861ddd0fabd6f467a42c098cae043..005814b64de29d3c7501d1db1ed49b4be7f8f0d6 100644 (file)
@@ -6,9 +6,9 @@
 
 #define NUM_ELEMENTS 1e5
 
-int cmp_int(const void *ia, const void *ib)
+int cmp_int(const int *ia, const int *ib)
 {
-       return *(const int *) ia - *(const int *) ib;
+       return *ia - *ib;
 }
 
 void clear_callback(int *ia, int *ib)
@@ -68,5 +68,5 @@ int main()
        }
 
        int last = -1;
-       tree_clr(&tree, (void *) &clear_callback, &last, NULL, TRAVERSION_INORDER);
+       tree_clr(&tree, &clear_callback, &last, NULL, TRAVERSION_INORDER);
 }