Implement peer review suggestions

pull/4141/head
kaleb-himes 2021-07-16 09:57:11 -06:00
parent b29fa9bd33
commit f408eeb5bb
2 changed files with 10 additions and 7 deletions

View File

@ -110,7 +110,10 @@
#undef NO_FILESYSTEM
#define NO_FILESYSTEM
#elif defined(ANDROID) && !defined(ANDROID_v454)
/* ANDROID_V454 (for android studio) displays information in a textview
* and redirects printf to the textview output instead of using
* __android_log_print() */
#elif defined(ANDROID) && !defined(ANDROID_V454)
#ifdef XMALLOC_USER
#include <stdlib.h> /* we're using malloc / free direct here */
#endif

View File

@ -172,15 +172,15 @@ _Pragma("GCC diagnostic ignored \"-Wunused-function\"")
#endif
#include <android/log.h>
#ifndef ANDROID_v454 /* See fips/android/wolfCrypt_v454_android */
#define printf(...) \
__android_log_print(ANDROID_LOG_DEBUG, "TAG", __VA_ARGS__)
#define fprintf(fp, ...) \
__android_log_print(ANDROID_LOG_DEBUG, "TAG", __VA_ARGS__)
#else
#ifdef ANDROID_V454 /* See fips/android/wolfCrypt_v454_android */
#ifndef NO_FILESYSTEM
#define NO_FILESYSTEM /* Turn off tests that want to call SaveDerAndPem() */
#endif
#else
#define printf(...) \
__android_log_print(ANDROID_LOG_DEBUG, "TAG", __VA_ARGS__)
#define fprintf(fp, ...) \
__android_log_print(ANDROID_LOG_DEBUG, "TAG", __VA_ARGS__)
#endif
#elif defined(WOLFSSL_DEOS)
#include <printx.h>