summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-08-05 18:41:47 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-08-05 18:41:47 +0200
commit738ec8a824ea16ddd97624995c99e1be4fea091c (patch)
tree562d96a462cb9ca2649cd61ef91ad48639a66b71
parentc28a8ba769f2c0468436e7a5d42264644711ff51 (diff)
sfeed_xmlenc: simplify and kill some lines
-rw-r--r--sfeed_xmlenc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sfeed_xmlenc.c b/sfeed_xmlenc.c
index 52fa5a8..223951a 100644
--- a/sfeed_xmlenc.c
+++ b/sfeed_xmlenc.c
@@ -7,6 +7,7 @@
#include "xml.h"
+static XMLParser parser;
static int isxmlpi = 0, tags = 0;
static void
@@ -55,12 +56,9 @@ xmlattr(XMLParser *p, const char *tag, size_t taglen, const char *name,
int
main(void)
{
- XMLParser parser;
-
- memset(&parser, 0, sizeof(parser));
+ parser.xmlattr = xmlattr;
parser.xmltagstart = xmltagstart;
parser.xmltagend = xmltagend;
- parser.xmlattr = xmlattr;
xmlparser_parse_fd(&parser, 0);