diff --git a/src/model.c b/src/model.c index 23675d9..4b4b29e 100644 --- a/src/model.c +++ b/src/model.c @@ -49,7 +49,8 @@ struct model_t *knownModels = NULL; */ void model_populate_hashtable(xmlNode *node, xmlHashTablePtr hashTable, - char *currentPath) { + char *currentPath) +{ if (node == NULL) return; // Skip text nodes and others that are not element nodes @@ -83,7 +84,8 @@ void model_populate_hashtable(xmlNode *node, * @param path The path to the tag, with '/' as the delimiter. * @return The content of the tag at the end of the path, or NULL if not found. */ -char* model_find_node_by_path(xmlNode *node, const char *path) { +char* model_find_node_by_path(xmlNode *node, const char *path) +{ return (xmlNodePtr)xmlHashLookup(hashTable, (const xmlChar *)path); } @@ -97,7 +99,8 @@ char* model_find_node_by_path(xmlNode *node, const char *path) { */ int model_modify_node(xmlHashTablePtr hashTable, const char *path, - const char *newContent) { + const char *newContent) +{ xmlNodePtr node = model_find_node_by_path(hashTable, path); if (node) { // Free the current content of the node, if any