diff --git a/src/cc_list.c b/src/cc_list.c index c703549..9500c23 100644 --- a/src/cc_list.c +++ b/src/cc_list.c @@ -1159,7 +1159,7 @@ static INLINE void merge(Node **left, Node **right, size_t l_size, size_t i; for (i = 0; i < size; i++) { - int c = cmp(&(l_part->data), &(r_part->data)); + int c = cmp(l_part->data, r_part->data); if ((c < 0 || c == 0)) { /* The two partitions are already sorted. */ diff --git a/test/list_test.c b/test/list_test.c index 3c08fd9..9e58ed6 100644 --- a/test/list_test.c +++ b/test/list_test.c @@ -6,8 +6,8 @@ int cmp(void const* e1, void const* e2) { - int i = *(*((int**)e1)); - int j = *(*((int**)e2)); + int i = *((int*)e1); + int j = *((int*)e2); if (i < j) return -1;