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
6
dtc.c
6
dtc.c
|
@ -109,7 +109,7 @@ int main(int argc, char *argv[])
|
|||
const char *outform = "dts";
|
||||
const char *outname = "-";
|
||||
const char *depname = NULL;
|
||||
int force = 0, sort = 0;
|
||||
bool force = false, sort = false;
|
||||
const char *arg;
|
||||
int opt;
|
||||
FILE *outf = NULL;
|
||||
|
@ -148,7 +148,7 @@ int main(int argc, char *argv[])
|
|||
padsize = strtol(optarg, NULL, 0);
|
||||
break;
|
||||
case 'f':
|
||||
force = 1;
|
||||
force = true;
|
||||
break;
|
||||
case 'q':
|
||||
quiet++;
|
||||
|
@ -174,7 +174,7 @@ int main(int argc, char *argv[])
|
|||
break;
|
||||
|
||||
case 's':
|
||||
sort = 1;
|
||||
sort = true;
|
||||
break;
|
||||
|
||||
case 'W':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue