fst_read_next_text_param() is never called with buflen <= 1, so this
separate error path is practically unreachable. Merge it with another
error path to make this a bit more compact.
Signed-off-by: Jouni Malinen <j@w1.fi>
size_t max_chars_to_copy;
char *cur_dest;
- if (buflen <= 1)
- return -EINVAL;
-
*endp = (char *) params;
while (isspace(**endp))
(*endp)++;
- if (!**endp)
+ if (!**endp || buflen <= 1)
return -EINVAL;
max_chars_to_copy = buflen - 1;