mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
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>
This commit is contained in:

committed by
Edward O'Callaghan

parent
65067c7d8e
commit
358a350e11
4
layout.c
4
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].start = strtol(tstr1, (char **)NULL, 16);
|
||||||
layout->entries[layout->num_entries].end = strtol(tstr2, (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);
|
layout->entries[layout->num_entries].name = strdup(tempname);
|
||||||
if (!layout->entries[layout->num_entries].name) {
|
if (!layout->entries[layout->num_entries].name) {
|
||||||
msg_gerr("Error adding layout entry: %s\n", strerror(errno));
|
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++) {
|
for (i = 0; i < layout->num_entries; i++) {
|
||||||
free(layout->entries[i].name);
|
free(layout->entries[i].name);
|
||||||
layout->entries[i].included = 0;
|
layout->entries[i].included = false;
|
||||||
}
|
}
|
||||||
layout->num_entries = 0;
|
layout->num_entries = 0;
|
||||||
}
|
}
|
||||||
|
2
layout.h
2
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_region(const struct flashrom_layout *, chipoff_t);
|
||||||
const struct romentry *layout_next_included(const struct flashrom_layout *, const struct romentry *);
|
const struct romentry *layout_next_included(const struct flashrom_layout *, const struct romentry *);
|
||||||
|
|
||||||
#endif /* !__LAYOUT_H__ */
|
#endif /* !__LAYOUT_H__ */
|
||||||
|
Reference in New Issue
Block a user