res = check_exp(macro ? OPENSSL_FILE : test_fn, ln, sz, false, false,
ret, exp, exp_malloc_cnt, exp_realloc_cnt);
if (res == 0)
- TEST_error("realloc return code check fail with i = %zu"
- ", old_ret = %p, ret = %p, old_nmemb = %#zx"
- ", nmemb = %#zx, size = %#zx",
- i, (void *) old_ret, (void *) ret, old_nmemb, nmemb,
- td->size);
+ TEST_error("realloc return code check fail with i = %zu, ret = %p"
+ ", old_nmemb = %#zx, nmemb = %#zx, size = %#zx",
+ i, (void *) ret, old_nmemb, nmemb, td->size);
/* Write data on the first pass and check it on the second */
if (res != 0 && exp == EXP_NONNULL && exp2 == EXP_NONNULL) {
}
/* Freeing the old allocation if realloc has failed */
- if (old_ret != 0 && ret == 0 && exp != EXP_ZERO_SIZE)
+ if (ret == NULL && exp != EXP_ZERO_SIZE)
OPENSSL_free(old_ret);
old_ret = ret;