aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-05-15 14:13:50 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-05-15 14:29:33 +0300
commit7dbea4b03426d8a81dbc6563b96aa760e719f5a8 (patch)
tree96b4b3707414880ff2d40aca8ec34b66f1ee466b
parent1658f5685bd396ce6bfd8e4822f4a9363eb4a4c9 (diff)
downloadgrecs-7dbea4b03426d8a81dbc6563b96aa760e719f5a8.tar.gz
grecs-7dbea4b03426d8a81dbc6563b96aa760e719f5a8.tar.bz2
Bugfix
* src/wordsplit.c (wordsplit_finish): Fix typo. (wsplt_assign_param): Use _wsplt_seterr
-rw-r--r--src/wordsplit.c6
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
@@ -836,9 +836,9 @@ wordsplit_finish (struct wordsplit *wsp)
return rc;
}
else
{
- wsp->ws_error = WRDSE_EOF;
+ wsp->ws_errno = WRDSE_EOF;
return WRDSE_EOF;
}
goto again;
}
@@ -1162,9 +1162,9 @@ 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)
@@ -1209,9 +1209,9 @@ 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);

Return to:

Send suggestions and report system problems to the System administrator.