Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/25019 )
Change subject: lib: Add FIT payload support ......................................................................
Patch Set 37:
(1 comment)
https://review.coreboot.org/c/coreboot/+/25019/37/src/lib/fit_payload.c File src/lib/fit_payload.c:
https://review.coreboot.org/c/coreboot/+/25019/37/src/lib/fit_payload.c@45 PS37, Line 45: * Returns true on error, false on success.
Patrick, This was just pointed out in another commit. […]
Do we have a hard and fast rule about how to do this? There are plenty of C functions where a 0 return code means success and non-zero means error (e.g. strcmp()), I assumed this was done in that spirit. (I think some guidelines suggest a pattern where functions that represent an action like extract() return 0 on success and non-zero on error, whereas functions that check if something is the case like islower() return the truth value of the check... but it's not widely standardized among C programmers.)
Anyway, I'm fine with flipping it either way here, just saying that I can see arguments made in favor of both versions. (That's why I kinda dislike a bool return type for functions like this in general... if it's int, people would more commonly expect the 0-means-success pattern.)