summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2020-12-19 11:21:49 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2020-12-20 23:10:08 +0000
commit358a350e11d26e882996a704821d83b846aab0d8 (patch)
tree7df3f2df2c385030800d2a527be7641e2adf24ee
parent65067c7d8e3c0ea0ca0bd7101a036748a272dfb0 (diff)
downloadflashrom-358a350e11d26e882996a704821d83b846aab0d8.tar.gz
flashrom-358a350e11d26e882996a704821d83b846aab0d8.tar.bz2
flashrom-358a350e11d26e882996a704821d83b846aab0d8.zip
layout.h,c: Use 'false' over '0' for bool type
The field member 'included' is of type boolean and so keep to using 'true, false' values over numerics like '0'. Get rid of a unnecessary yet trivial tab at the end of layout.h while we are here. BUG=none BRANCH=none TEST=builds Change-Id: Ib594de2834175482ae5e36d9dd354ef2555c53d5 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/48743 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sam McNally <sammc@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-rw-r--r--layout.c4
-rw-r--r--layout.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/layout.c b/layout.c
index d80b01fa6..272912c68 100644
--- a/layout.c
+++ b/layout.c
@@ -81,7 +81,7 @@ int read_romlayout(const char *name)
}
layout->entries[layout->num_entries].start = strtol(tstr1, (char **)NULL, 16);
layout->entries[layout->num_entries].end = strtol(tstr2, (char **)NULL, 16);
- layout->entries[layout->num_entries].included = 0;
+ layout->entries[layout->num_entries].included = false;
layout->entries[layout->num_entries].name = strdup(tempname);
if (!layout->entries[layout->num_entries].name) {
msg_gerr("Error adding layout entry: %s\n", strerror(errno));
@@ -205,7 +205,7 @@ void layout_cleanup(struct layout_include_args **args)
for (i = 0; i < layout->num_entries; i++) {
free(layout->entries[i].name);
- layout->entries[i].included = 0;
+ layout->entries[i].included = false;
}
layout->num_entries = 0;
}
diff --git a/layout.h b/layout.h
index 8e4eb1342..cceedd1fe 100644
--- a/layout.h
+++ b/layout.h
@@ -67,4 +67,4 @@ int process_include_args(struct flashrom_layout *l, const struct layout_include_
const struct romentry *layout_next_included_region(const struct flashrom_layout *, chipoff_t);
const struct romentry *layout_next_included(const struct flashrom_layout *, const struct romentry *);
-#endif /* !__LAYOUT_H__ */
+#endif /* !__LAYOUT_H__ */