Merge pull request #5130 from JacobBarthelmeh/examples

print out test errors to stderr instead of stdout
This commit is contained in:
Daniel Pouzzner
2022-05-12 12:44:45 -05:00
committed by GitHub

View File

@ -606,7 +606,7 @@ err_sys(const char* msg)
if (msg) if (msg)
#endif #endif
{ {
printf("wolfSSL error: %s\n", msg); fprintf(stderr, "wolfSSL error: %s\n", msg);
} }
XEXIT_T(EXIT_FAILURE); XEXIT_T(EXIT_FAILURE);
} }
@ -630,9 +630,9 @@ err_sys_with_errno(const char* msg)
#endif #endif
{ {
#if defined(HAVE_STRING_H) && defined(HAVE_ERRNO_H) #if defined(HAVE_STRING_H) && defined(HAVE_ERRNO_H)
printf("wolfSSL error: %s: %s\n", msg, strerror(errno)); fprintf(stderr, "wolfSSL error: %s: %s\n", msg, strerror(errno));
#else #else
printf("wolfSSL error: %s\n", msg); fprintf(stderr, "wolfSSL error: %s\n", msg);
#endif #endif
} }
XEXIT_T(EXIT_FAILURE); XEXIT_T(EXIT_FAILURE);