From 738ec8a824ea16ddd97624995c99e1be4fea091c Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Wed, 5 Aug 2015 18:41:47 +0200 Subject: sfeed_xmlenc: simplify and kill some lines --- sfeed_xmlenc.c | 6 ++---- 1 file 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); -- cgit v1.2.3