Blob Blame History Raw
test: Fix type of User_equal

The match function has void * arguments, not User * arguments. This
avoids an implicit function pointer type conversion in test_list_find,
which is not accepted by all compilers anymore.

Submitted upstream: <https://github.com/clibs/list/pull/47>

diff --git a/test.c b/test.c
index 32fa0f3662c0dfab..0323c6f06e8e6d1a 100644
--- a/test.c
+++ b/test.c
@@ -25,7 +25,9 @@ typedef struct {
 } User;
 
 static int
-User_equal(User *a, User *b) {
+User_equal(void *a1, void *b1) {
+  User *a = a1;
+  User *b = b1;
   return 0 == strcmp(a->name, b->name);
 }