]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- coding style 555/head
authorArvin Schnell <aschnell@suse.de>
Wed, 2 Sep 2020 11:07:57 +0000 (13:07 +0200)
committerArvin Schnell <aschnell@suse.de>
Wed, 2 Sep 2020 11:07:57 +0000 (13:07 +0200)
snapper/XmlFile.cc

index ee5d9b85260870522cb0e09e30958618ccf94d91..09823ae179f8d2cdd2bd0af9873e7dea935255e3 100644 (file)
@@ -109,6 +109,7 @@ namespace snapper
     {
        if (node != NULL)
            node = node->children;
+
        for (const xmlNode* cur_node = node; cur_node; cur_node = cur_node->next)
        {
            if (strcmp(name, (const char*) cur_node->name) == 0)
@@ -128,6 +129,7 @@ namespace snapper
 
        if (node != NULL)
            node = node->children;
+
        for (const xmlNode* cur_node = node; cur_node; cur_node = cur_node->next)
        {
            if (cur_node->type == XML_ELEMENT_NODE &&
@@ -140,6 +142,7 @@ namespace snapper
        return ret;
     }
 
+
     bool
     getValue(const xmlNode* node, string& value)
     {
@@ -147,16 +150,18 @@ namespace snapper
        if (tmp == nullptr)
            return false;
 
-       value = (const char *) tmp;
+       value = (const char*) tmp;
        xmlFree(tmp);
        return true;
     }
 
+
     bool
     getChildValue(const xmlNode* node, const char* name, string& value)
     {
        if (node != NULL)
            node = node->children;
+
        for (const xmlNode* cur_node = node; cur_node; cur_node = cur_node->next)
        {
            if (cur_node->type == XML_ELEMENT_NODE &&
@@ -186,18 +191,20 @@ namespace snapper
        return true;
     }
 
+
     bool
     getAttributeValue(const xmlNode* node, const char* name, string& value)
     {
-       xmlChar* tmp = xmlGetNoNsProp(node, (const xmlChar *) name);
+       xmlChar* tmp = xmlGetNoNsProp(node, (const xmlChar*) name);
        if (tmp == nullptr)
            return false;
 
-       value = (const char *) tmp;
+       value = (const char*) tmp;
        xmlFree(tmp);
        return true;
     }
 
+
     bool
     getAttributeValue(const xmlNode* node, const char* name, bool& value)
     {
@@ -209,6 +216,7 @@ namespace snapper
        return true;
     }
 
+
     void
     setChildValue(xmlNode* node, const char* name, const char* value)
     {