From adcacefc26fabadc74cec14c190c9d849d34a636 Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Sat, 24 Sep 2016 14:39:22 +0200 Subject: Make the path static That way it should only be initialized once and then reused. --- sxmlc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sxmlc.c b/sxmlc.c index eee2f26..fc5f66d 100644 --- a/sxmlc.c +++ b/sxmlc.c @@ -56,7 +56,7 @@ XMLNode* find_child_node(XMLNode *node, const char* tagname) { void print_article_title(XMLNode *root) { XMLNode* next = root; - const char *path[] = {"front", "article-meta", "title-group", "article-title", NULL}; + static const char *path[] = {"front", "article-meta", "title-group", "article-title", NULL}; for (int i = 0; path[i]; i++) { next = find_child_node(next, path[i]); -- cgit v1.2.3