rename node to parent to prevent having variables at 2 scopes with the same name.

This commit is contained in:
Steven Jackson 2015-09-20 20:45:06 +01:00
commit 308ee024f2
2 changed files with 5 additions and 5 deletions

View file

@ -20,15 +20,15 @@
#include "module.h"
CONFIG_NODE *config_node_find(CONFIG_NODE *node, const char *key)
CONFIG_NODE *config_node_find(CONFIG_NODE *parent, const char *key)
{
GSList *tmp;
g_return_val_if_fail(node != NULL, NULL);
g_return_val_if_fail(parent != NULL, NULL);
g_return_val_if_fail(key != NULL, NULL);
g_return_val_if_fail(is_node_list(node), NULL);
g_return_val_if_fail(is_node_list(parent), NULL);
for (tmp = node->value; tmp != NULL; tmp = tmp->next) {
for (tmp = parent->value; tmp != NULL; tmp = tmp->next) {
CONFIG_NODE *node = tmp->data;
if (node->key != NULL && g_ascii_strcasecmp(node->key, key) == 0)

View file

@ -113,7 +113,7 @@ int config_set_bool(CONFIG_REC *rec, const char *section, const char *key, int v
/* Handling the configuration directly with nodes -
useful when you need to read all values in a block/list. */
CONFIG_NODE *config_node_find(CONFIG_NODE *node, const char *key);
CONFIG_NODE *config_node_find(CONFIG_NODE *parent, const char *key);
/* Find the section from node - if not found create it unless new_type is -1.
You can also specify in new_type if it's NODE_TYPE_LIST or NODE_TYPE_BLOCK */
CONFIG_NODE *config_node_section(CONFIG_REC *rec, CONFIG_NODE *parent, const char *key, int new_type);