aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-05-22 14:47:44 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-05-22 14:47:44 +0300
commit43a1c4ce04cf9301b88c8df31087fe84dcb7e232 (patch)
treee3ef1701474ac5ebae5df8c7c66b38b129533b9a
parenta531c7d1de4780ee53ffbd383329dfff55d425b0 (diff)
downloadgrecs-43a1c4ce04cf9301b88c8df31087fe84dcb7e232.tar.gz
grecs-43a1c4ce04cf9301b88c8df31087fe84dcb7e232.tar.bz2
Minor fix
* src/wordsplit.c (wordsplit_run): Return consistent error code.
-rw-r--r--src/wordsplit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wordsplit.c b/src/wordsplit.c
index dab6c4d..5468297 100644
--- a/src/wordsplit.c
+++ b/src/wordsplit.c
@@ -2391,25 +2391,25 @@ wordsplit_process_list (struct wordsplit *wsp, size_t start)
}
static int
wordsplit_run (const char *command, size_t length, struct wordsplit *wsp,
int flags, int lvl)
{
int rc;
size_t start;
if (!command)
{
if (!(flags & WRDSF_INCREMENTAL))
- return EINVAL;
+ return _wsplt_seterr (wsp, WRDSE_USAGE);
if (wsp->ws_head)
return wordsplit_finish (wsp);
start = skip_delim_real (wsp);
if (wsp->ws_endp == wsp->ws_len)
return _wsplt_seterr (wsp, WRDSE_NOINPUT);
wsp->ws_flags |= WRDSF_REUSE;
wordsplit_init0 (wsp);
}
else

Return to:

Send suggestions and report system problems to the System administrator.