if (reg->chain)
xfree(reg->chain);
- reg->chain = (char *)nft_mxml_str_parse(tree, "chain",
- MXML_DESCEND);
+ reg->chain = nft_mxml_str_parse(tree, "chain", MXML_DESCEND);
if (reg->chain == NULL) {
mxmlDelete(tree);
return -1;
if (prefix == NULL)
return -1;
- log->prefix = (char *)prefix;
+ log->prefix = prefix;
e->flags |= (1 << NFT_EXPR_LOG_PREFIX);
if (nft_mxml_num_parse(tree, "group", MXML_DESCEND_FIRST, BASE_DEC,
mxml_node_t *tree;
mxml_node_t *node = NULL;
struct nft_set_elem *elem;
- char *name;
- char *table;
+ const char *name, *table, *family_str;
int family;
- char *family_str;
tree = mxmlLoadString(NULL, xml, MXML_OPAQUE_CALLBACK);
if (tree == NULL) {
if (strcmp(tree->value.opaque, "set") != 0)
goto err;
- name = (char *)nft_mxml_str_parse(tree, "set_name",
- MXML_DESCEND_FIRST);
+ name = nft_mxml_str_parse(tree, "set_name", MXML_DESCEND_FIRST);
if (name == NULL)
goto err;
s->name = name;
s->flags |= (1 << NFT_SET_ATTR_NAME);
- table = (char *)nft_mxml_str_parse(tree, "set_table",
- MXML_DESCEND_FIRST);
+ table = nft_mxml_str_parse(tree, "set_table", MXML_DESCEND_FIRST);
if (table == NULL)
goto err;
s->table = strdup(table);
s->flags |= (1 << NFT_SET_ATTR_TABLE);
- family_str = (char *)nft_mxml_str_parse(tree, "family",
- MXML_DESCEND_FIRST);
+ family_str = nft_mxml_str_parse(tree, "family", MXML_DESCEND_FIRST);
if (family_str == NULL)
goto err;