aboutsummaryrefslogtreecommitdiff
path: root/flattree.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2013-10-28 21:06:53 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2013-10-28 21:06:53 +1100
commit17625371eeea2fa7257361163c52d336a1a98ebc (patch)
tree9d6ebe9b93acaa2b962d2a6993b4e3b00ce0c708 /flattree.c
parent79eebb23dbf1f6eeff1789cd0d6f1c1fe620a487 (diff)
downloaddtc-17625371eeea2fa7257361163c52d336a1a98ebc.tar.gz
Use stdbool more widely
We already use the C99 bool type from stdbool.h in a few places. However there are many other places we represent boolean values as plain ints. This patch changes that. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'flattree.c')
-rw-r--r--flattree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/flattree.c b/flattree.c
index 665dad7..bd99fa2 100644
--- a/flattree.c
+++ b/flattree.c
@@ -261,7 +261,7 @@ static void flatten_tree(struct node *tree, struct emitter *emit,
{
struct property *prop;
struct node *child;
- int seen_name_prop = 0;
+ bool seen_name_prop = false;
if (tree->deleted)
return;
@@ -279,7 +279,7 @@ static void flatten_tree(struct node *tree, struct emitter *emit,
int nameoff;
if (streq(prop->name, "name"))
- seen_name_prop = 1;
+ seen_name_prop = true;
nameoff = stringtable_insert(strbuf, prop->name);