From 317c97bd81d413d47bf377c4ff3a83f003dcadbd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 19 Sep 2019 09:32:03 +0200 Subject: version: Expression 'left > 1' is always true Fixes warning detected by PVS-Studio Fixes #4374 --- lib/version.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'lib/version.c') diff --git a/lib/version.c b/lib/version.c index ae2b09d31..c9ccd8c93 100644 --- a/lib/version.c +++ b/lib/version.c @@ -104,14 +104,12 @@ char *curl_version(void) left -= len; ptr += len; - if(left > 1) { - len = Curl_ssl_version(ptr + 1, left - 1); + len = Curl_ssl_version(ptr + 1, left - 1); - if(len > 0) { - *ptr = ' '; - left -= ++len; - ptr += len; - } + if(len > 0) { + *ptr = ' '; + left -= ++len; + ptr += len; } #ifdef HAVE_LIBZ -- cgit v1.2.3