From: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> Date: Thu, 9 Dec 2021 09:37:33 +0000 (+0100) Subject: Condition `len>=0` is true after `if (len < 0)` X-Git-Tag: v9.00~62^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b8e44b0969e6e5420a247f739dd1d8c80c36e8b5;p=users%2Fdwmw2%2Fopenconnect.git Condition `len>=0` is true after `if (len < 0)` Fixes a Codacy alert: Condition 'len>=0' is always true Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> --- diff --git a/compat.c b/compat.c index ecaf87d3..6b7a06c8 100644 --- 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);