From: Alan T. DeKok Date: Wed, 13 Apr 2022 12:33:22 +0000 (-0400) Subject: no need for intermediate variable. CID #1504026 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9203d26de1b9efccd8e593eef1649788c566050;p=thirdparty%2Ffreeradius-server.git no need for intermediate variable. CID #1504026 --- diff --git a/src/lib/tls/engine.c b/src/lib/tls/engine.c index c0d0d2333ad..4ed82324e93 100644 --- a/src/lib/tls/engine.c +++ b/src/lib/tls/engine.c @@ -72,10 +72,9 @@ static int8_t tls_engine_cmp(void const *one, void const *two) { tls_engine_t const *a = talloc_get_type_abort_const(one, tls_engine_t); tls_engine_t const *b = talloc_get_type_abort_const(two, tls_engine_t); - int8_t ret; + uint8_t ret; - ret = strcmp(a->id, b->id); - ret = CMP(ret, 0); + ret = CMP(strcmp(a->id, b->id), 0); if (ret != 0) return ret; /* @@ -85,8 +84,7 @@ static int8_t tls_engine_cmp(void const *one, void const *two) if (!a->instance) return -1; if (!b->instance) return +1; - ret = strcmp(a->instance, b->instance); - return CMP(ret, 0); + return CMP(strcmp(a->instance, b->instance), 0); } /** Add the list of supported engine commands to the error stack