ANSI funcs with no args
[pazpar2-moved-to-github.git] / src / pazpar2_config.c
index 11cc316..ef6f2e4 100644 (file)
@@ -176,7 +176,7 @@ int conf_service_metadata_field_id(struct conf_service *service,
     }
    
     return -1;
-};
+}
 
 
 int conf_service_sortkey_field_id(struct conf_service *service,
@@ -193,7 +193,7 @@ int conf_service_sortkey_field_id(struct conf_service *service,
     }
    
     return -1;
-};
+}
 
 
 
@@ -384,6 +384,7 @@ static struct conf_service *parse_service(xmlNode *node)
             xmlFree(xml_type);
             xmlFree(xml_termlist);
             xmlFree(xml_rank);
+            xmlFree(xml_setting);
             md_node++;
         }
         else
@@ -470,15 +471,21 @@ static struct conf_server *parse_server(xmlNode *node)
         }
         else if (!strcmp((const char *) n->name, "relevance"))
         {
-            server->relevance_pct = pp2_charset_create_xml(n->children);
+            server->relevance_pct = pp2_charset_create_xml(n);
+            if (!server->relevance_pct)
+                return 0;
         }
         else if (!strcmp((const char *) n->name, "sort"))
         {
-            server->sort_pct = pp2_charset_create_xml(n->children);
+            server->sort_pct = pp2_charset_create_xml(n);
+            if (!server->sort_pct)
+                return 0;
         }
         else if (!strcmp((const char *) n->name, "mergekey"))
         {
-            server->mergekey_pct = pp2_charset_create_xml(n->children);
+            server->mergekey_pct = pp2_charset_create_xml(n);
+            if (!server->mergekey_pct)
+                return 0;
         }
         else if (!strcmp((const char *) n->name, "service"))
         {