summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/elements.c2
-rw-r--r--examples/outline.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/elements.c b/examples/elements.c
index 42f0889..4ed4da6 100644
--- a/examples/elements.c
+++ b/examples/elements.c
@@ -37,7 +37,7 @@ main(int argc, char *argv[])
do {
size_t len = fread(buf, 1, sizeof(buf), stdin);
done = len < sizeof(buf);
- if (!XML_Parse(parser, buf, len, done)) {
+ if (XML_Parse(parser, buf, len, done) == XML_STATUS_ERROR) {
fprintf(stderr,
"%s at line %d\n",
XML_ErrorString(XML_GetErrorCode(parser)),
diff --git a/examples/outline.c b/examples/outline.c
index 2eeca06..10f6d1d 100644
--- a/examples/outline.c
+++ b/examples/outline.c
@@ -76,7 +76,7 @@ main(int argc, char *argv[])
}
done = feof(stdin);
- if (! XML_Parse(p, Buff, len, done)) {
+ if (XML_Parse(p, Buff, len, done) == XML_STATUS_ERROR) {
fprintf(stderr, "Parse error at line %d:\n%s\n",
XML_GetCurrentLineNumber(p),
XML_ErrorString(XML_GetErrorCode(p)));