[Crosstoolchain-logs] [device-tree-compiler] 26/58: dtc: Use streq() in preference to strcmp()
Vagrant Cascadian
vagrant at moszumanska.debian.org
Mon Sep 25 16:23:46 UTC 2017
This is an automated email from the git hooks/post-receive script.
vagrant pushed a commit to branch debian/master
in repository device-tree-compiler.
commit 120775eb1cf39f8dcecd695c3ff1cfef8aeb669d
Author: David Gibson <david at gibson.dropbear.id.au>
Date: Mon Feb 13 15:57:54 2017 +1100
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 at gibson.dropbear.id.au>
---
checks.c | 2 +-
livetree.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/checks.c b/checks.c
index 67237ff..cce0cca 100644
--- a/checks.c
+++ b/checks.c
@@ -325,7 +325,7 @@ static void check_property_name_chars_strict(struct check *c,
continue;
/* Certain names are whitelisted */
- if (strcmp(name, "device_type") == 0)
+ if (streq(name, "device_type"))
continue;
/*
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;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git
More information about the Crosstoolchain-logs
mailing list