Skip to content

Commit

Permalink
Fixes for consistency in ASSERT_SAVED_VECTOR_REGISTERS and `RESTORE…
Browse files Browse the repository at this point in the history
…_VECTOR_REGISTERS`.
  • Loading branch information
dgarske committed Nov 1, 2024
1 parent 99daac3 commit 671f931
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions wolfssl/wolfcrypt/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,

#endif

#define ASSERT_SAVED_VECTOR_REGISTERS(fail_clause) do { \
#define ASSERT_SAVED_VECTOR_REGISTERS() do { \
if (wc_svr_count <= 0) { \
fprintf(stderr, \
("ASSERT_SAVED_VECTOR_REGISTERS : %s @ L%d : " \
Expand All @@ -460,7 +460,6 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
wc_svr_last_file, \
wc_svr_last_line); \
DEBUG_VECTOR_REGISTERS_EXTRA_FAIL_CLAUSE \
{ fail_clause } \
} \
} while (0)
#define ASSERT_RESTORED_VECTOR_REGISTERS(fail_clause) do { \
Expand All @@ -477,7 +476,7 @@ WOLFSSL_LOCAL int wc_debug_CipherLifecycleFree(void **CipherLifecycleTag,
{ fail_clause } \
} \
} while (0)
#define RESTORE_VECTOR_REGISTERS(...) do { \
#define RESTORE_VECTOR_REGISTERS() do { \
--wc_svr_count; \
if ((wc_svr_count > 4) || (wc_svr_count < 0)) { \
fprintf(stderr, \
Expand Down
2 changes: 1 addition & 1 deletion wolfssl/wolfcrypt/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,7 @@ typedef struct w64wrapper {
#define WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(x) WC_DO_NOTHING
#endif
#ifndef ASSERT_SAVED_VECTOR_REGISTERS
#define ASSERT_SAVED_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING
#define ASSERT_SAVED_VECTOR_REGISTERS() WC_DO_NOTHING
#endif
#ifndef ASSERT_RESTORED_VECTOR_REGISTERS
#define ASSERT_RESTORED_VECTOR_REGISTERS(fail_clause) WC_DO_NOTHING
Expand Down

0 comments on commit 671f931

Please sign in to comment.