diff --git a/src/util.h b/src/util.h index 41cb35d..d767bdb 100644 --- a/src/util.h +++ b/src/util.h @@ -7,10 +7,6 @@ #include "internal.h" -#ifndef _SSIZE_T_DEFINED -typedef intptr_t ssize_t; -#endif - #define array_count(a) (sizeof(a) / (sizeof((a)[0]))) /* clang-format off */ diff --git a/test/test-tree.c b/test/test-tree.c index a2cd956..de1842a 100644 --- a/test/test-tree.c +++ b/test/test-tree.c @@ -6,7 +6,6 @@ #include "test-util.h" #include "tree.h" -#include "util.h" #define NODE_COUNT 1000 static_assert(NODE_COUNT <= RAND_MAX, "NODE_COUNT too high"); @@ -54,21 +53,21 @@ static void check_tree_count(const tree_t* tree, size_t expected_count) { } static void keys_increasing(tree_t* tree, test_op_t op) { - size_t i; + uintptr_t i; for (i = 0; i < NODE_COUNT; i++) op(tree, i); } static void keys_decreasing(tree_t* tree, test_op_t op) { - ssize_t i; + intptr_t i; for (i = NODE_COUNT - 1; i >= 0; i--) - op(tree, (size_t) i); + op(tree, (uintptr_t) i); } static void keys_random(tree_t* tree, test_op_t op) { uintptr_t keys[NODE_COUNT]; uintptr_t index, key; - ssize_t left; + intptr_t left; for (index = 0; index < NODE_COUNT; index++) keys[index] = index;