diff options
| author | Jouni Malinen <j@w1.fi> | 2015-07-26 16:18:40 +0300 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:20:00 -0600 |
| commit | e20a559b6fa47822d7626ef5ba22064185899778 (patch) | |
| tree | 6431f09a3f07761e55b0eb11dff0cda3d10f0936 /src/fst | |
| parent | 1dd8da70c06ef14b720b620e227f60d373d889e2 (diff) | |
| download | android_external_wpa_supplicant_8-e20a559b6fa47822d7626ef5ba22064185899778.tar.gz android_external_wpa_supplicant_8-e20a559b6fa47822d7626ef5ba22064185899778.tar.bz2 android_external_wpa_supplicant_8-e20a559b6fa47822d7626ef5ba22064185899778.zip | |
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.
Change-Id: Ibb3ebc00f49ec20e91503d43cdeabf8887566dd0
Signed-off-by: Jouni Malinen <j@w1.fi>
Git-commit: 1ab51fb595232e630d530169237833c7be0763a3
Git-repo: git://w1.fi/srv/git/hostap.git
CRs-Fixed: 891455
Diffstat (limited to 'src/fst')
| -rw-r--r-- | src/fst/fst_ctrl_iface.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/fst/fst_ctrl_iface.c b/src/fst/fst_ctrl_iface.c index 06bba5a5..76d4776b 100644 --- a/src/fst/fst_ctrl_iface.c +++ b/src/fst/fst_ctrl_iface.c @@ -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; |
