Minor fix

* src/wordsplit.c (wordsplit_run): Return consistent error
code.
This commit is contained in:
Sergey Poznyakoff 2018-05-22 14:47:44 +03:00
parent 9ccdca6ec3
commit 8923c8c06f

View file

@ -2400,7 +2400,7 @@ wordsplit_run (const char *command, size_t length, struct wordsplit *wsp,
if (!command)
{
if (!(flags & WRDSF_INCREMENTAL))
return EINVAL;
return _wsplt_seterr (wsp, WRDSE_USAGE);
if (wsp->ws_head)
return wordsplit_finish (wsp);