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>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user