Merge pull request #4500 from cconlon/errorQueueFix

fix wc_ERR_print_errors_fp() unit test with NO_ERROR_QUEUE
This commit is contained in:
JacobBarthelmeh
2021-10-27 05:56:32 +07:00
committed by GitHub

View File

@ -37037,9 +37037,16 @@ static int test_wc_ERR_print_errors_fp (void)
#if defined(DEBUG_WOLFSSL) #if defined(DEBUG_WOLFSSL)
AssertTrue(XFSEEK(fp, 0, XSEEK_END) == 0); AssertTrue(XFSEEK(fp, 0, XSEEK_END) == 0);
sz = XFTELL(fp); sz = XFTELL(fp);
#ifdef NO_ERROR_QUEUE
/* File should be empty when NO_ERROR_QUEUE is defined */
if (sz != 0) {
ret = BAD_FUNC_ARG;
}
#else
if (sz == 0) { if (sz == 0) {
ret = BAD_FUNC_ARG; ret = BAD_FUNC_ARG;
} }
#endif
#endif #endif
printf(resultFmt, ret == 0 ? passed : failed); printf(resultFmt, ret == 0 ? passed : failed);
XFCLOSE(fp); XFCLOSE(fp);