diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2019-05-15 14:13:50 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2019-05-15 14:29:33 +0300 |
commit | 7dbea4b03426d8a81dbc6563b96aa760e719f5a8 (patch) | |
tree | 96b4b3707414880ff2d40aca8ec34b66f1ee466b | |
parent | 1658f5685bd396ce6bfd8e4822f4a9363eb4a4c9 (diff) | |
download | grecs-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.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 | |||
@@ -837,7 +837,7 @@ wordsplit_finish (struct wordsplit *wsp) | |||
837 | } | 837 | } |
838 | else | 838 | else |
839 | { | 839 | { |
840 | wsp->ws_error = WRDSE_EOF; | 840 | wsp->ws_errno = WRDSE_EOF; |
841 | return WRDSE_EOF; | 841 | return WRDSE_EOF; |
842 | } | 842 | } |
843 | goto again; | 843 | goto again; |
@@ -1163,7 +1163,7 @@ wsplt_assign_param (struct wordsplit *wsp, int param_idx, char *value) | |||
1163 | char *v; | 1163 | char *v; |
1164 | 1164 | ||
1165 | if (param_idx < 0) | 1165 | if (param_idx < 0) |
1166 | return WRDSE_BADPARAM; | 1166 | return _wsplt_seterr (wsp, WRDSE_BADPARAM); |
1167 | if (param_idx == wsp->ws_paramc) | 1167 | if (param_idx == wsp->ws_paramc) |
1168 | { | 1168 | { |
1169 | char **parambuf; | 1169 | char **parambuf; |
@@ -1210,7 +1210,7 @@ wsplt_assign_param (struct wordsplit *wsp, int param_idx, char *value) | |||
1210 | wsp->ws_paramc = param_idx + 1; | 1210 | wsp->ws_paramc = param_idx + 1; |
1211 | } | 1211 | } |
1212 | else if (param_idx > wsp->ws_paramc) | 1212 | else if (param_idx > wsp->ws_paramc) |
1213 | return WRDSE_BADPARAM; | 1213 | return _wsplt_seterr (wsp, WRDSE_BADPARAM); |
1214 | 1214 | ||
1215 | v = strdup (value); | 1215 | v = strdup (value); |
1216 | if (!v) | 1216 | if (!v) |