diff options
author | 2016-04-24 12:57:58 +0200 | |
---|---|---|
committer | 2016-04-24 12:58:31 +0200 | |
commit | 89c5e1f681107b6d9f8ba7f761c388d1e2052fe4 (patch) | |
tree | c5ce4530d0c03fa1c04021844272b82b7b7ebcbc /src/lib/util/xmlfile.cpp | |
parent | ef0968b87042040e1f0e18c84ce804f744f8e23e (diff) |
Various cleanups suggested by static analyzer (nw)
Diffstat (limited to 'src/lib/util/xmlfile.cpp')
-rw-r--r-- | src/lib/util/xmlfile.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/util/xmlfile.cpp b/src/lib/util/xmlfile.cpp index db288b0a807..b1ed844dc71 100644 --- a/src/lib/util/xmlfile.cpp +++ b/src/lib/util/xmlfile.cpp @@ -70,7 +70,7 @@ static const char *copystring(const char *input) { char *newstr; - /* NULL just passes through */ + /* nullptr just passes through */ if (input == nullptr) return nullptr; @@ -94,7 +94,7 @@ static const char *copystring_lower(const char *input) char *newstr; int i; - /* NULL just passes through */ + /* nullptr just passes through */ if (input == nullptr) return nullptr; @@ -300,7 +300,7 @@ xml_data_node *xml_find_matching_sibling(xml_data_node *node, const char *name, /* loop over siblings and find a matching attribute */ for ( ; node; node = node->next) { - /* can pass NULL as a wildcard for the node name */ + /* can pass nullptr as a wildcard for the node name */ if (name == nullptr || strcmp(name, node->name) == 0) { /* find a matching attribute */ @@ -373,7 +373,7 @@ void xml_delete_node(xml_data_node *node) /*------------------------------------------------- xml_get_attribute - get the value of the - specified attribute, or NULL if not found + specified attribute, or nullptr if not found -------------------------------------------------*/ xml_attribute_node *xml_get_attribute(xml_data_node *node, const char *attribute) @@ -934,7 +934,7 @@ static xml_data_node *add_child(xml_data_node *parent, const char *name, const c node->attribute = nullptr; /* add us to the end of the list of siblings */ - for (pnode = &parent->child; *pnode; pnode = &(*pnode)->next) ; + for (pnode = &parent->child; *pnode; pnode = &(*pnode)->next) { } *pnode = node; return node; @@ -984,7 +984,7 @@ static xml_attribute_node *add_attribute(xml_data_node *node, const char *name, } /* add us to the end of the list of attributes */ - for (panode = &node->attribute; *panode; panode = &(*panode)->next) ; + for (panode = &node->attribute; *panode; panode = &(*panode)->next) { } *panode = anode; return anode; |