From ef1bb9a92e4224bb76db02552dc2b6f1e0cf9107 Mon Sep 17 00:00:00 2001 From: Duc Nguyen Date: Sun, 22 Oct 2023 15:44:27 -0400 Subject: [PATCH] improve readablity --- src/sig_stfl/xmss/sig_stfl_xmss_secret_key_functions.c | 2 +- tests/test_sig_stfl.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sig_stfl/xmss/sig_stfl_xmss_secret_key_functions.c b/src/sig_stfl/xmss/sig_stfl_xmss_secret_key_functions.c index 141b2a7da3..5e083d3550 100644 --- a/src/sig_stfl/xmss/sig_stfl_xmss_secret_key_functions.c +++ b/src/sig_stfl/xmss/sig_stfl_xmss_secret_key_functions.c @@ -148,4 +148,4 @@ void OQS_SECRET_KEY_XMSS_activate_unlock(OQS_SIG_STFL_SECRET_KEY *sk) { sk->is_locked = false; } } -} \ No newline at end of file +} diff --git a/tests/test_sig_stfl.c b/tests/test_sig_stfl.c index dc6487f24e..428bf35697 100644 --- a/tests/test_sig_stfl.c +++ b/tests/test_sig_stfl.c @@ -646,13 +646,13 @@ static OQS_STATUS sig_stfl_test_secret_key(const char *method_name, const char * goto err; } - if (!sk->secret_key_data) { + if (sk->secret_key_data == NULL) { fprintf(stderr, "ERROR: OQS_SECRET_KEY_new incomplete.\n"); goto err; } /* set context and secure store callback */ - if (sk->set_scrt_key_store_cb) { + if (sk->set_scrt_key_store_cb != NULL) { context = strdup(file_store_name); sk->set_scrt_key_store_cb(sk, save_secret_key, (void *)context); } @@ -925,7 +925,7 @@ static OQS_STATUS sig_stfl_test_secret_key_lock(const char *method_name, const c goto err; } - if (!lock_test_sk->secret_key_data) { + if (lock_test_sk->secret_key_data == NULL) { fprintf(stderr, "ERROR: OQS_SECRET_KEY_new incomplete.\n"); goto err; }