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
|
@ -26,12 +26,12 @@ extern int yyparse(void);
|
|||
extern YYLTYPE yylloc;
|
||||
|
||||
struct boot_info *the_boot_info;
|
||||
int treesource_error;
|
||||
bool treesource_error;
|
||||
|
||||
struct boot_info *dt_from_source(const char *fname)
|
||||
{
|
||||
the_boot_info = NULL;
|
||||
treesource_error = 0;
|
||||
treesource_error = false;
|
||||
|
||||
srcfile_push(fname);
|
||||
yyin = current_srcfile->f;
|
||||
|
@ -54,7 +54,7 @@ static void write_prefix(FILE *f, int level)
|
|||
fputc('\t', f);
|
||||
}
|
||||
|
||||
static int isstring(char c)
|
||||
static bool isstring(char c)
|
||||
{
|
||||
return (isprint(c)
|
||||
|| (c == '\0')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue