Skip to content

Commit 1e931b1

Browse files
committed
remove dead code (Clang Static Analyzer warning)
1 parent 730ab74 commit 1e931b1

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

src/pk/ecc/ecc_sm2.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ static int s_ecc_sign_hash_sm2(const unsigned char *in, unsigned long inlen,
304304
modular inverse is blinded with random b
305305
*/
306306

307-
err = CRYPT_ERROR;
308307
have_pubkey = 0;
309308
for (max_iterations = LTC_PK_MAX_RETRIES; max_iterations > 0; max_iterations--) {
310309
if ((err = ecc_copy_curve(key, &pubkey)) != CRYPT_OK) goto cleanup;
@@ -562,7 +561,6 @@ int ecc_encrypt_key_sm2(const unsigned char *in, unsigned long inlen,
562561
}
563562

564563
/* C1 = scalmult(k, G), (x2, y2) = scalmult(k, PB), mask = KDF(x2 || y2) */
565-
err = CRYPT_ERROR;
566564
have_pubkey = 0;
567565
for (max_iterations = LTC_PK_MAX_RETRIES; max_iterations > 0; max_iterations--) {
568566
unsigned long tmplen = c1len;

0 commit comments

Comments
 (0)