From 38cbe2a44390c6d4b47b15adc329f8d52d23155f Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Thu, 28 Mar 2024 22:00:00 +0200 Subject: [PATCH] src/model.c: sanitize style --- src/model.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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