diff --git a/tests/alloc_test.c b/tests/alloc_test.c index 89d85c402..9c291f4fd 100644 --- a/tests/alloc_test.c +++ b/tests/alloc_test.c @@ -197,12 +197,12 @@ static void s_threaded_realloc_worker(void *user_data) { size_t old_size = size; size = rand() % 1024; if (old_size) { - AWS_FATAL_ASSERT(0 == memcmp(alloc, &thread_data->thread_idx, 1)); + AWS_FATAL_ASSERT(*(uint8_t*)alloc == (uint8_t)thread_data->thread_idx); } AWS_FATAL_ASSERT(0 == aws_mem_realloc(test_allocator, &alloc, old_size, size)); /* If there was a value, make sure it's still there */ if (old_size && size) { - AWS_FATAL_ASSERT(0 == memcmp(alloc, &thread_data->thread_idx, 1)); + AWS_FATAL_ASSERT(*(uint8_t*)alloc == (uint8_t)thread_data->thread_idx); } if (size) { memset(alloc, (int)thread_data->thread_idx, size);