summaryrefslogtreecommitdiff
path: root/dtc-lexer.l
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 /dtc-lexer.l
parent79eebb23dbf1f6eeff1789cd0d6f1c1fe620a487 (diff)
downloaddevice-tree-compiler-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 'dtc-lexer.l')
-rw-r--r--dtc-lexer.l8
1 files changed, 4 insertions, 4 deletions
diff --git a/dtc-lexer.l b/dtc-lexer.l
index 3b41bfc..369407a 100644
--- a/dtc-lexer.l
+++ b/dtc-lexer.l
@@ -61,7 +61,7 @@ static int dts_version = 1;
BEGIN(V1); \
static void push_input_file(const char *filename);
-static int pop_input_file(void);
+static bool pop_input_file(void);
%}
%%
@@ -238,13 +238,13 @@ static void push_input_file(const char *filename)
}
-static int pop_input_file(void)
+static bool pop_input_file(void)
{
if (srcfile_pop() == 0)
- return 0;
+ return false;
yypop_buffer_state();
yyin = current_srcfile->f;
- return 1;
+ return true;
}