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.
This commit is contained in:
Aurelien DARRAGON 2022-11-22 11:48:12 +01:00 committed by Christopher Faulet
parent ab9efc25f0
commit ac1ca5cc7b

View File

@ -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] == '\'') {