Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/48743 )
Change subject: layout.h,c: Use 'false' over '0' for bool type ......................................................................
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 --- M layout.c M layout.h 2 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/43/48743/1
diff --git a/layout.c b/layout.c index d80b01f..272912c 100644 --- a/layout.c +++ b/layout.c @@ -81,7 +81,7 @@ } 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 @@
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 8e4eb13..cceedd1 100644 --- a/layout.h +++ b/layout.h @@ -67,4 +67,4 @@ 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__ */
Sam McNally has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/48743 )
Change subject: layout.h,c: Use 'false' over '0' for bool type ......................................................................
Patch Set 1: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/48743 )
Change subject: layout.h,c: Use 'false' over '0' for bool type ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/flashrom/+/48743/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/48743/1//COMMIT_MSG@10 PS1, Line 10: Get rid of : a unnecessary yet trivial tab at the end of layout.h while we : are here. I'm not fond of bolting unrelated style changes onto patches, but arguing about it would be even worse. There doesn't seem to be a consistent convention anyway.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/48743 )
Change subject: layout.h,c: Use 'false' over '0' for bool type ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/flashrom/+/48743/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/48743/1//COMMIT_MSG@10 PS1, Line 10: Get rid of : a unnecessary yet trivial tab at the end of layout.h while we : are here.
I'm not fond of bolting unrelated style changes onto patches, but arguing about it would be even wor […]
Agreed. The change was just so trivial here there was just so little point I did however think about it.
Edward O'Callaghan has submitted this change. ( https://review.coreboot.org/c/flashrom/+/48743 )
Change subject: layout.h,c: Use 'false' over '0' for bool type ......................................................................
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 --- M layout.c M layout.h 2 files changed, 3 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved Sam McNally: Looks good to me, approved
diff --git a/layout.c b/layout.c index d80b01f..272912c 100644 --- a/layout.c +++ b/layout.c @@ -81,7 +81,7 @@ } 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 @@
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 8e4eb13..cceedd1 100644 --- a/layout.h +++ b/layout.h @@ -67,4 +67,4 @@ 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__ */