summaryrefslogtreecommitdiff
path: root/livetree.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2017-02-13 15:57:54 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2017-02-13 15:57:54 +1100
commit120775eb1cf39f8dcecd695c3ff1cfef8aeb669d (patch)
tree6b6102ee68ad131a407852a8cfb665fadae35057 /livetree.c
parent852e9ecbe1976927057402f8a8f71ee8e8a49098 (diff)
downloaddevice-tree-compiler-120775eb1cf39f8dcecd695c3ff1cfef8aeb669d.tar.gz
dtc: Use streq() in preference to strcmp()
dtc defines a streq() (string equality) macro to avoid the easy confusion of the sense of strcmp() comparison for equality. A few places where we don't use it have slipped in, so remove them. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'livetree.c')
-rw-r--r--livetree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/livetree.c b/livetree.c
index 994b6c2..36be9af 100644
--- a/livetree.c
+++ b/livetree.c
@@ -242,7 +242,7 @@ void delete_property_by_name(struct node *node, char *name)
struct property *prop = node->proplist;
while (prop) {
- if (!strcmp(prop->name, name)) {
+ if (streq(prop->name, name)) {
delete_property(prop);
return;
}
@@ -275,7 +275,7 @@ void delete_node_by_name(struct node *parent, char *name)
struct node *node = parent->children;
while (node) {
- if (!strcmp(node->name, name)) {
+ if (streq(node->name, name)) {
delete_node(node);
return;
}