Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42043 )
Change subject: util/amdfwtool: update to allow building in any location ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42043/1/util/amdfwtool/amdfwtool.c File util/amdfwtool/amdfwtool.c:
https://review.coreboot.org/c/coreboot/+/42043/1/util/amdfwtool/amdfwtool.c@... PS1, Line 1182: uint8_t
Just recently learned about resentments of C people of using `bool`. I’d use `int` then.
for me it's about semantics here. when a variable has bool type, it's clear that it's either zero or non-zero and that's all the code cares about. if it's an int, it's not clear if the actual values does matter in some place or if it only matters if it's zero or non-zero. so for me it makes it much easiert to see what's going on in the code. C doesn't have much of a proper type system, but i like to at least use what's there. I don't insist on this change, but better readability also means better maintainability and less chances of breaking things in the future for me.
and using int instead of an unsigned type is a bad idea. i think i've seen some bitfield structs where the field type was signed and the width 1 bit, which is even more undefined behaviour than bitfield structs alone