From: Viktor Dukhovni Date: Sat, 31 Aug 2024 02:27:33 +0000 (+1000) Subject: Drop redundant non-negative checks on unsigned values X-Git-Tag: openssl-3.5.0-alpha1~1174 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8439337036bbfd940657b95e01e5bc08dc63d331;p=thirdparty%2Fopenssl.git Drop redundant non-negative checks on unsigned values Reviewed-by: Paul Dale Reviewed-by: Neil Horman Reviewed-by: Tom Cosgrove (Merged from https://github.com/openssl/openssl/pull/25341) --- diff --git a/test/bio_base64_test.c b/test/bio_base64_test.c index 0acb50503c8..9851aa63654 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; /*