Condition `len>=0` is true after `if (len < 0)`
authorDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Thu, 9 Dec 2021 09:37:33 +0000 (10:37 +0100)
committerDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Sat, 26 Feb 2022 15:51:07 +0000 (16:51 +0100)
Fixes a Codacy alert:
Condition 'len>=0' is always true

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
compat.c

index ecaf87d3832f2fe9dc83de5cf1348d5ea292aff7..6b7a06c82745fe60c53119195968bd32352792b0 100644 (file)
--- a/compat.c
+++ b/compat.c
@@ -99,7 +99,7 @@ int openconnect__vasprintf(char **strp, const char *fmt, va_list ap)
                res = NULL;
                goto err;
        }
-       if (len >= 0 && len < 160)
+       if (len < 160)
                goto out;
 
        free(res);