From: Alan T. DeKok Date: Fri, 6 Mar 2026 01:14:58 +0000 (-0500) Subject: use same code as previous check X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb740ebbd88c066e674e12c2a2c09435db2dbde5;p=thirdparty%2Ffreeradius-server.git use same code as previous check this should really be abstracted into a common function --- diff --git a/src/lib/tls/bio.c b/src/lib/tls/bio.c index cc04df3c300..5b51eed1726 100644 --- a/src/lib/tls/bio.c +++ b/src/lib/tls/bio.c @@ -152,7 +152,7 @@ static int _tls_bio_talloc_gets_cb(BIO *bio, char *buf, int size) if (to_copy >= (size_t)size) to_copy = (size_t)size - 1; /* Space for \0 */ slen = fr_dbuff_out_memcpy((uint8_t *)buf, &bd->dbuff_out, to_copy); - if (fr_cond_assert(slen < 0)) { /* Shouldn't happen */ + if (!fr_cond_assert(slen >= 0)) { /* Shouldn't happen */ buf[0] = '\0'; return (int)slen; }