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:
parent
54b227a1ff
commit
1ab51fb595
1 changed files with 1 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue