Skip to content

Commit

Permalink
fix scan build warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ducnguyen-sb committed Sep 7, 2023
1 parent 7a639f5 commit 2eaecae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/sig_stfl/lms/sig_stfl_lms_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ OQS_API OQS_STATUS OQS_SIG_STFL_lms_sigs_left(unsigned long long *remain, const
return OQS_SUCCESS;
}

OQS_API OQS_STATUS OQS_SIG_STFL_lms_sigs_total(uint64_t *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) {
OQS_API OQS_STATUS OQS_SIG_STFL_lms_sigs_total(unsigned long long *total, const OQS_SIG_STFL_SECRET_KEY *secret_key) {

if (total == NULL || secret_key == NULL) {
return OQS_ERROR;
Expand Down Expand Up @@ -437,7 +437,7 @@ OQS_STATUS oqs_deserialize_lms_key(OQS_SIG_STFL_SECRET_KEY *sk, const size_t sk_
return OQS_ERROR;
}

if (sk->secret_key_data != NULL) {
if (sk->secret_key_data) {
//Key data already present
//We dont want to trample over data
return OQS_ERROR;
Expand Down
6 changes: 0 additions & 6 deletions src/sig_stfl/xmss/sig_stfl_xmss_secret_key_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ OQS_STATUS OQS_SECRET_KEY_XMSS_deserialize_key(OQS_SIG_STFL_SECRET_KEY *sk, cons
return OQS_ERROR;
}

if (sk->secret_key_data != NULL) {
// Secret key data already present
// We don't want to trample over exist data
return OQS_ERROR;
}

memcpy(sk->secret_key_data, sk_buf, sk_len);

return OQS_SUCCESS;
Expand Down

0 comments on commit 2eaecae

Please sign in to comment.