From: Adam Dickmeiss Date: Mon, 3 Feb 2014 13:42:46 +0000 (+0100) Subject: Avoid mixed stmt/var declare X-Git-Tag: v1.6.39~10 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=074ed4b3116930e53285769df06bd2b785825d71;p=pazpar2-moved-to-github.git Avoid mixed stmt/var declare --- diff --git a/src/pazpar2_config.c b/src/pazpar2_config.c index da3d469..3b9d47a 100644 --- a/src/pazpar2_config.c +++ b/src/pazpar2_config.c @@ -515,9 +515,9 @@ static int parse_metadata(struct conf_service *service, xmlNode *n, static void service_add_metadata(xmlNode *n, int *num_metadata, int *num_sortkeys) { + xmlChar *sortkey = xmlGetProp(n, (xmlChar *) "sortkey"); (*num_metadata)++; - xmlChar *sortkey = xmlGetProp(n, (xmlChar *) "sortkey"); if (sortkey && strcmp((const char *) sortkey, "no")) (*num_sortkeys)++; xmlFree(sortkey);