aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/support
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/support')
-rw-r--r--test/core/support/alloc_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/core/support/alloc_test.c b/test/core/support/alloc_test.c
index e2d0c16b41..7eaf7a14f3 100644
--- a/test/core/support/alloc_test.c
+++ b/test/core/support/alloc_test.c
@@ -46,7 +46,7 @@ static void fake_free(void *addr) {
static void test_custom_allocs() {
const gpr_allocation_functions default_fns = gpr_get_allocation_functions();
intptr_t addr_to_free = 0;
- int *i;
+ char *i;
gpr_allocation_functions fns = {fake_malloc, fake_realloc, fake_free};
gpr_set_allocation_functions(fns);
@@ -58,7 +58,7 @@ static void test_custom_allocs() {
/* Restore and check we don't get funky values and that we don't leak */
gpr_set_allocation_functions(default_fns);
- GPR_ASSERT((void *)1 != (i = gpr_malloc(sizeof(*i))));
+ GPR_ASSERT((void *)sizeof(*i) != (i = gpr_malloc(sizeof(*i))));
GPR_ASSERT((void *)2 != (i = gpr_realloc(i, 2)));
gpr_free(i);
}