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
4
srcpos.c
4
srcpos.c
|
@ -159,7 +159,7 @@ void srcfile_push(const char *fname)
|
|||
current_srcfile = srcfile;
|
||||
}
|
||||
|
||||
int srcfile_pop(void)
|
||||
bool srcfile_pop(void)
|
||||
{
|
||||
struct srcfile_state *srcfile = current_srcfile;
|
||||
|
||||
|
@ -177,7 +177,7 @@ int srcfile_pop(void)
|
|||
* fix this we could either allocate all the files from a
|
||||
* table, or use a pool allocator. */
|
||||
|
||||
return current_srcfile ? 1 : 0;
|
||||
return current_srcfile ? true : false;
|
||||
}
|
||||
|
||||
void srcfile_add_search_path(const char *dirname)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue