summaryrefslogtreecommitdiffstats
path: root/test/bio_base64_test.c
diff options
context:
space:
mode:
authorViktor Dukhovni <openssl-users@dukhovni.org>2024-08-31 04:27:33 +0200
committerTomas Mraz <tomas@openssl.org>2024-09-05 17:28:47 +0200
commit8439337036bbfd940657b95e01e5bc08dc63d331 (patch)
tree8c54e990eabebb5971591e1fca56f7720acf17e8 /test/bio_base64_test.c
parentblank line required to display code in `openssl-ts.pod.in` (diff)
downloadopenssl-8439337036bbfd940657b95e01e5bc08dc63d331.tar.xz
openssl-8439337036bbfd940657b95e01e5bc08dc63d331.zip
Drop redundant non-negative checks on unsigned values
Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/25341)
Diffstat (limited to 'test/bio_base64_test.c')
-rw-r--r--test/bio_base64_test.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/test/bio_base64_test.c b/test/bio_base64_test.c
index 0acb50503c..9851aa6365 100644
--- a/test/bio_base64_test.c
+++ b/test/bio_base64_test.c
@@ -98,9 +98,6 @@ static int encode(unsigned const char *buf, unsigned buflen, char *encoded,
int pos = 0;
char nl = '\n';
- if (buflen < 0)
- return 0;
-
/* Use a verbatim encoding when provided */
if (encoded != NULL) {
int elen = strlen(encoded);
@@ -317,7 +314,7 @@ static int generic_case(test_case *t, int verbose)
int ok = 1;
for (llen = linelengths; *llen > 0; ++llen) {
- for (wscnt = wscnts; *wscnt >= 0 && *wscnt * 2 < *llen; ++wscnt) {
+ for (wscnt = wscnts; *wscnt * 2 < *llen; ++wscnt) {
int extra = t->no_nl ? 64 : 0;
/*