Skip to content

Commit ad2621a

Browse files
authored
Merge pull request #6572 from douzzer/20230703-clang-tidy-fixes
20230703-clang-tidy-fixes
2 parents 678a658 + 214f9f5 commit ad2621a

3 files changed

Lines changed: 14 additions & 11 deletions

File tree

tests/api.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45867,7 +45867,11 @@ static int test_wc_ecc_get_curve_id_from_dp_params(void)
4586745867
ExpectIntEQ(wc_ecc_get_curve_id_from_name("SECP256R1"), ECC_SECP256R1);
4586845868
ExpectNotNull(ecKey = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1));
4586945869

45870-
ret = EC_KEY_generate_key(ecKey);
45870+
if (EXPECT_SUCCESS()) {
45871+
ret = EC_KEY_generate_key(ecKey);
45872+
} else
45873+
ret = 0;
45874+
4587145875
if (ret == 1) {
4587245876
/* normal test */
4587345877
key = (ecc_key*)ecKey->internal;

wolfcrypt/benchmark/benchmark.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -915,8 +915,9 @@ static const char* bench_Usage_msg1[][22] = {
915915
"-p521 Measure ECC using P-521 curve.\n",
916916
"-ecc-all Bench all enabled ECC curves.\n",
917917
"-<alg> Algorithm to benchmark. Available algorithms include:\n",
918-
"-lng <num> Display benchmark result by specified language.\n"
919-
" 0: English, 1: Japanese\n",
918+
("-lng <num> Display benchmark result by specified language.\n"
919+
" 0: English, 1: Japanese\n"
920+
),
920921
"<num> Size of block in bytes\n",
921922
("-blocks <num> Number of blocks. Can be used together with the "
922923
"'Size of block'\n"
@@ -943,10 +944,12 @@ static const char* bench_Usage_msg1[][22] = {
943944
"-p384 Measure ECC using P-384 curve.\n",
944945
"-p521 Measure ECC using P-521 curve.\n",
945946
"-ecc-all Bench all enabled ECC curves.\n",
946-
"-<alg> アルゴリズムのベンチマークを実施します。\n"
947-
" 利用可能なアルゴリズムは下記を含みます:\n",
948-
"-lng <num> 指定された言語でベンチマーク結果を表示します。\n"
949-
" 0: 英語、 1: 日本語\n",
947+
("-<alg> アルゴリズムのベンチマークを実施します。\n"
948+
" 利用可能なアルゴリズムは下記を含みます:\n"
949+
),
950+
("-lng <num> 指定された言語でベンチマーク結果を表示します。\n"
951+
" 0: 英語、 1: 日本語\n"
952+
),
950953
"<num> ブロックサイズをバイト単位で指定します。\n",
951954
"-blocks <num> TBD.\n",
952955
"-threads <num> 実行するスレッド数\n",

wolfcrypt/src/asn.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11133,9 +11133,7 @@ void InitDecodedCert_ex(DecodedCert* cert,
1113311133
#endif /* WOLFSSL_HAVE_ISSUER_NAMES */
1113411134
#endif /* WOLFSSL_CERT_GEN || WOLFSSL_CERT_EXT */
1113511135

11136-
#ifndef NO_CERTS
1113711136
InitSignatureCtx(&cert->sigCtx, heap, devId);
11138-
#endif
1113911137
}
1114011138
}
1114111139

@@ -11246,9 +11244,7 @@ void FreeDecodedCert(DecodedCert* cert)
1124611244
if (cert->sce_tsip_encRsaKeyIdx != NULL)
1124711245
XFREE(cert->sce_tsip_encRsaKeyIdx, cert->heap, DYNAMIC_TYPE_RSA);
1124811246
#endif
11249-
#ifndef NO_CERTS
1125011247
FreeSignatureCtx(&cert->sigCtx);
11251-
#endif
1125211248
}
1125311249

1125411250
void wc_FreeDecodedCert(DecodedCert* cert)

0 commit comments

Comments
 (0)