Skip to content

Commit e1ea92c

Browse files
committed
Addressed Copilot review comments
1 parent de71361 commit e1ea92c

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/hash/clu_hash.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ int wolfCLU_hash(WOLFSSL_BIO* bioIn, WOLFSSL_BIO* bioOut, const char* alg,
121121
}
122122
#endif
123123
#ifndef NO_SHA
124-
if (ret == WOLFCLU_SUCCESS && XSTRNCMP(alg, "sha", 3) == 0
125-
&& XSTRLEN(alg) == 3) {
124+
if (ret == WOLFCLU_SUCCESS && XSTRCMP(alg, "sha") == 0) {
126125
ret = wc_ShaHash(input, inputSz, output);
127126
}
128127
#endif

src/hash/clu_hash_setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ int wolfCLU_hashSetup(int argc, char** argv)
140140
#endif
141141

142142
#ifndef NO_SHA
143-
if ((XSTRNCMP(alg, "sha", 3) == 0) && (XSTRLEN(alg) == 3))
143+
if (XSTRCMP(alg, "sha") == 0)
144144
size = WC_SHA_DIGEST_SIZE;
145145
#endif
146146

0 commit comments

Comments
 (0)