Use memset rather than bzero (obsolete, and sometimes unavailable).
[pazpar2-moved-to-github.git] / src / config.c
index 2de8479..e99991e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: config.c,v 1.6 2007-01-08 19:39:12 quinn Exp $ */
+/* $Id: config.c,v 1.8 2007-01-10 10:04:23 adam Exp $ */
 
 #include <string.h>
 
@@ -91,7 +91,7 @@ static struct conf_service *parse_service(xmlNode *node)
             if (rank)
                 md->rank = atoi(rank);
             else
-                md->rank = 1;
+                md->rank = 0;
 
             if (type)
             {
@@ -107,7 +107,8 @@ static struct conf_service *parse_service(xmlNode *node)
                     return 0;
                 }
             }
-            md->type = Metadata_type_generic;
+            else
+                md->type = Metadata_type_generic;
 
             if (sortkey)
             {
@@ -327,7 +328,7 @@ static struct conf_retrievalprofile *parse_retrievalprofile(xmlNode *node)
             xmlChar *charset = xmlGetProp(n, "charset");
             xmlChar *format = xmlGetProp(n, "format");
             xmlChar *stylesheet = xmlGetProp(n, "stylesheet");
-            bzero(m, sizeof(*m));
+            memset(m, 0, sizeof(*m));
             if (type)
             {
                 if (!strcmp(type, "xslt"))