From: Aurelien DARRAGON Date: Tue, 22 Nov 2022 10:48:12 +0000 (+0100) Subject: CLEANUP: arg: remove extra check in make_arg_list arg escaping X-Git-Tag: v2.7-dev10~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac1ca5cc7b69df0c3cfc218ca5645b2f36bd8421;p=thirdparty%2Fhaproxy.git CLEANUP: arg: remove extra check in make_arg_list arg escaping Len cannot be equal to 1 when entering in escape handling code. But yet, an extra "len == 1" check was performed. Removing this useless check. This was reported by Ilya with the help of cppcheck. --- diff --git a/src/arg.c b/src/arg.c index 17f5ed061d..2810050b0f 100644 --- a/src/arg.c +++ b/src/arg.c @@ -182,7 +182,7 @@ int make_arg_list(const char *in, int len, uint64_t mask, struct arg **argp, } else if (*in == '\\' && !squote && len != 1) { /* '\', ', ' ', '"' support being escaped by '\' */ - if (len == 1 || in[1] == 0) + if (in[1] == 0) goto unquote_err; if (in[1] == '\\' || in[1] == ' ' || in[1] == '"' || in[1] == '\'') {