diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-09-19 09:32:03 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-09-20 08:07:17 +0200 |
commit | 317c97bd81d413d47bf377c4ff3a83f003dcadbd (patch) | |
tree | b38baf02ce045805158cd6c2965cefbbc8c26f22 | |
parent | 389426e3d0d8b3b47cdc1ff18eb5a9a00a766615 (diff) |
version: Expression 'left > 1' is always true
Fixes warning detected by PVS-Studio
Fixes #4374
-rw-r--r-- | lib/version.c | 12 |
1 files changed, 5 insertions, 7 deletions
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 |