diff options
Diffstat (limited to 'src/wordsplit.c')
-rw-r--r-- | src/wordsplit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wordsplit.c b/src/wordsplit.c index 4e633fa..af747b3 100644 --- a/src/wordsplit.c +++ b/src/wordsplit.c @@ -834,13 +834,13 @@ wordsplit_finish (struct wordsplit *wsp) rc = wordsplit_process_list (wsp, skip_delim (wsp)); if (rc) return rc; } else { - wsp->ws_error = WRDSE_EOF; + wsp->ws_errno = WRDSE_EOF; return WRDSE_EOF; } goto again; } if (wsp->ws_flags & WRDSF_NOSPLIT) @@ -1160,13 +1160,13 @@ wsplt_assign_var (struct wordsplit *wsp, const char *name, size_t namelen, int wsplt_assign_param (struct wordsplit *wsp, int param_idx, char *value) { char *v; if (param_idx < 0) - return WRDSE_BADPARAM; + return _wsplt_seterr (wsp, WRDSE_BADPARAM); if (param_idx == wsp->ws_paramc) { char **parambuf; if (!wsp->ws_parambuf) { size_t i; @@ -1207,13 +1207,13 @@ wsplt_assign_param (struct wordsplit *wsp, int param_idx, char *value) } wsp->ws_paramv = (const char**) wsp->ws_parambuf; wsp->ws_paramc = param_idx + 1; } else if (param_idx > wsp->ws_paramc) - return WRDSE_BADPARAM; + return _wsplt_seterr (wsp, WRDSE_BADPARAM); v = strdup (value); if (!v) return _wsplt_nomem (wsp); free (wsp->ws_parambuf[param_idx]); |