diff options
| author | megazig <megazig@megazig-desktop.(none)> | 2009-05-20 23:12:55 -0500 |
|---|---|---|
| committer | megazig <megazig@megazig-desktop.(none)> | 2009-05-20 23:12:55 -0500 |
| commit | 1274bc0971966a53a139fcc18d9c16d735d4f5fc (patch) | |
| tree | e10eb511da463a0517b4878c49dddbc4e3c74ce8 /xml.c | |
| parent | 872b4ccd13e29c3a15e6a133bbefec320f4f22d0 (diff) | |
cleaned up memory leaks
Diffstat (limited to 'xml.c')
| -rw-r--r-- | xml.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -72,7 +72,6 @@ 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; @@ -81,12 +80,12 @@ const char *whitespace_cb(mxml_node_t *node, int where) temp = temp->parent; } if (where == 3 || where == 1){ - sprintf(xmlbuff, "%s", nulled); + return ""; }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, "%s", nulled); + return ""; } - return (xmlbuff); + return xmlbuff; } |
