diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-01-02 15:32:45 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2015-01-02 15:32:45 +0100 |
commit | f5be0d36c5d45c10e055c13dd8060152effa3aed (patch) | |
tree | 940dd802eceaccbc78cdd865f3f88faec5f070cb /sfeed_xmlenc.c | |
parent | bcd1e1972d63cdd2ca8b42572a129be521558aba (diff) |
cleanup
- dont free at end (not needed in our case).
- use 0 and 1 instead of EXIT_SUCCESS, EXIT_FAILURE.
- use err (from err.h) instead of custom die().
Diffstat (limited to 'sfeed_xmlenc.c')
-rw-r--r-- | sfeed_xmlenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sfeed_xmlenc.c b/sfeed_xmlenc.c index e465616..1dbfb5b 100644 --- a/sfeed_xmlenc.c +++ b/sfeed_xmlenc.c @@ -15,7 +15,7 @@ xmltagstart(XMLParser *p, const char *tag, size_t taglen) /* optimization: try to find processing instruction at start */ if(tags > 3) - exit(EXIT_FAILURE); + exit(1); isxmlpi = (!strncasecmp(tag, "?xml", taglen)) ? 1 : 0; tags++; } @@ -47,7 +47,7 @@ xmlattr(XMLParser *p, const char *tag, size_t taglen, const char *name, putc(tolower((int)*value), stdout); putchar('\n'); } - exit(EXIT_SUCCESS); + exit(0); } } @@ -63,5 +63,5 @@ main(void) xmlparser_parse(&x); - return EXIT_FAILURE; + return 1; } |