aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegazig <megazig@megazig-desktop.(none)>2009-05-20 22:13:35 -0500
committermegazig <megazig@megazig-desktop.(none)>2009-05-20 22:13:35 -0500
commit872b4ccd13e29c3a15e6a133bbefec320f4f22d0 (patch)
tree6d6dd33b7c85e85ae26df5ca9c5f310c84de26b1
parent1917cbdf100119b75fa51240b5e75372d61400a3 (diff)
no warnings
-rw-r--r--xml.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xml.c b/xml.c
index 4d0957f..0ab9f55 100644
--- a/xml.c
+++ b/xml.c
@@ -72,6 +72,7 @@ get_value(mxml_node_t *node, /* I - Node to get */
const char *whitespace_cb(mxml_node_t *node, int where)
{
/* code by Matt_P */
+ char* nulled = { '\0' };
const char *name = node->value.element.name;
mxml_node_t * temp = node;
int depth = 0;
@@ -80,11 +81,11 @@ const char *whitespace_cb(mxml_node_t *node, int where)
temp = temp->parent;
}
if (where == 3 || where == 1){
- sprintf(xmlbuff, "");
- }else if((node->prev && where == 0 || node->parent) && !(where == 2 && strncmp(name, "ua", 2) && strcmp(name, "flip") && strcmp(name, "zoom") && strcmp(name, "coords") && strcmp(name, "entries") && strcmp(name, "xmlyt") && strcmp(name, "xmlan") && strcmp(name, "entries") && strcmp(name, "triplet") && strcmp(name, "pair") && strcmp(name, "entry") && strcmp(name, "pane") && (strcmp(name, "tag") && strcmp(name, "size") && strcmp(name, "material") && strcmp(name, "colors") && strcmp(name, "font"))) ){
+ sprintf(xmlbuff, "%s", nulled);
+ }else if((node->prev && (where == 0 || node->parent)) && !(where == 2 && strncmp(name, "ua", 2) && strcmp(name, "flip") && strcmp(name, "zoom") && strcmp(name, "coords") && strcmp(name, "entries") && strcmp(name, "xmlyt") && strcmp(name, "xmlan") && strcmp(name, "entries") && strcmp(name, "triplet") && strcmp(name, "pair") && strcmp(name, "entry") && strcmp(name, "pane") && (strcmp(name, "tag") && strcmp(name, "size") && strcmp(name, "material") && strcmp(name, "colors") && strcmp(name, "subs") && strcmp(name, "font") && strcmp(name, "wnd4") && strcmp(name, "wnd4mat") && strcmp(name, "set") && strcmp(name, "coordinates"))) ){
sprintf(xmlbuff, "\n%*s", (depth-1)*4, "");
}else{
- sprintf(xmlbuff, "");
+ sprintf(xmlbuff, "%s", nulled);
}
return (xmlbuff);
}