diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2019-09-05 18:29:59 +0200 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2019-09-06 19:53:36 +0200 |
commit | 70a4a691fc43644e69d3876ed7d43ab717c9cb43 (patch) | |
tree | 3e5c929210165d0bf6a6a27a42735f52e9b204ce /expat | |
parent | 11a621be712f6a4c6c3256aaa8d95c916268f869 (diff) | |
download | libexpat-git-70a4a691fc43644e69d3876ed7d43ab717c9cb43.tar.gz |
xmlwf: Fix exit code for case without "-d DIRECTORY"
Diffstat (limited to 'expat')
-rw-r--r-- | expat/Changes | 8 | ||||
-rw-r--r-- | expat/xmlwf/xmlwf.c | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/expat/Changes b/expat/Changes index 4cf5ccb9..6513df47 100644 --- a/expat/Changes +++ b/expat/Changes @@ -12,6 +12,14 @@ Release x.x.x xxx xxx xx xxxx Bug fixes: #240 Fix cases where XML_StopParser did not have any effect when called from inside of an end element handler + #341 xmlwf: Fix exit code for operation without "-d DIRECTORY"; + previously, only "-d DIRECTORY" would give you a proper + exit code: + # xmlwf -d . <<<'<not well-formed>' 2>/dev/null ; echo $? + 2 + # xmlwf <<<'<not well-formed>' 2>/dev/null ; echo $? + 0 + Now both cases return exit code 2. Other changes: #325 Windows: Drop support for Visual Studio <=7.1/2003 diff --git a/expat/xmlwf/xmlwf.c b/expat/xmlwf/xmlwf.c index 0a154ca0..2d5a87e7 100644 --- a/expat/xmlwf/xmlwf.c +++ b/expat/xmlwf/xmlwf.c @@ -1114,11 +1114,13 @@ tmain(int argc, XML_Char **argv) { fclose(userData.fp); if (! result) { tremove(outName); - exit(2); } free(outName); } XML_ParserFree(parser); + if (! result) { + exit(2); + } } return 0; } |