summaryrefslogtreecommitdiff
path: root/dtc.c
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.c
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.c')
-rw-r--r--dtc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dtc.c b/dtc.c
index e3c9653..d36ccdc 100644
--- a/dtc.c
+++ b/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':