From fec2cdfb484718d4609a11ce5f896d5c9e098470 Mon Sep 17 00:00:00 2001 From: Songling Han Date: Sun, 22 Sep 2024 00:47:33 +0000 Subject: [PATCH] remove io for better performance during failure. add log later. Signed-off-by: Songling Han --- src/common/common.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/common/common.h b/src/common/common.h index d912d9370..6959282ee 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -86,10 +86,9 @@ extern "C" { * Prints an error message to stderr and return. * @param msg The error message to be printed. */ -#define OQS_EXIT(msg) \ - { \ - fprintf(stderr, "%s", msg); \ - return; \ +#define OQS_EXIT(msg) \ + { \ + return; /* TODO: better error handling */ \ } /** * Macro for terminating the program if x is @@ -98,7 +97,6 @@ extern "C" { #define OQS_EXIT_IF_NULLPTR(x, loc) \ do { \ if ( (x) == (void*)0 ) { \ - fprintf(stderr, "Unexpected NULL returned from %s API. Exiting.\n", loc); \ return; /* TODO: better error handling */ \ } \ } while (0)