mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
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:
parent
79eebb23db
commit
17625371ee
12 changed files with 39 additions and 37 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue