FST: Merge unreachable error case to another error return

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>
This commit is contained in:
Jouni Malinen 2015-07-26 16:18:40 +03:00
parent 54b227a1ff
commit 1ab51fb595

View file

@ -842,13 +842,10 @@ int fst_read_next_text_param(const char *params, char *buf, size_t buflen,
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;