Removed dead code

This commit is contained in:
Stefan Ritt 2011-07-18 12:52:02 +00:00
parent 55c55d04e8
commit 7c597e7f45

8
mxml.c
View File

@ -279,7 +279,6 @@ void mxml_encode(char *src, int size, int translate)
buffer_size = size; buffer_size = size;
} }
ps = src;
pd = _encode_buffer; pd = _encode_buffer;
for (ps = src ; *ps && (size_t)pd - (size_t)_encode_buffer < (size_t)(size-10) ; ps++) { for (ps = src ; *ps && (size_t)pd - (size_t)_encode_buffer < (size_t)(size-10) ; ps++) {
@ -667,11 +666,8 @@ PMXML_NODE mxml_add_special_node_at(PMXML_NODE parent, int node_type, const char
assert(parent); assert(parent);
if (parent->n_children == 0) if (parent->n_children == 0)
parent->child = (PMXML_NODE)mxml_malloc(sizeof(MXML_NODE)); parent->child = (PMXML_NODE)mxml_malloc(sizeof(MXML_NODE));
else { else
pchild = parent->child;
parent->child = (PMXML_NODE)mxml_realloc(parent->child, sizeof(MXML_NODE)*(parent->n_children+1)); parent->child = (PMXML_NODE)mxml_realloc(parent->child, sizeof(MXML_NODE)*(parent->n_children+1));
}
assert(parent->child); assert(parent->child);
/* move following nodes one down */ /* move following nodes one down */
@ -1755,8 +1751,6 @@ int mxml_parse_entity(char **buf, const char *file_name, char *error, int error_
goto error; goto error;
} }
len = (int)((size_t) pv - (size_t) p);
entity_name[nentity][0] = '&'; entity_name[nentity][0] = '&';
i = 1; i = 1;
entity_name[nentity][i] = 0; entity_name[nentity][i] = 0;