Alex Thiessen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32858 )
Change subject: console: Move poor-man's atoi() into string.h ......................................................................
Patch Set 3:
(3 comments)
FYI at work, we integrated a small integer parsing library written in lex, featuring negative numbers, hex, octal, binary, digit group separators and detecting overflows. To be published at the end of this year.
https://review.coreboot.org/#/c/32858/3/src/include/string.h File src/include/string.h:
https://review.coreboot.org/#/c/32858/3/src/include/string.h@182 PS3, Line 182: a positive integer 'an integer without a sign' because it works for 0 (not a positive integer) and fails for '+1' (which is one).
https://review.coreboot.org/#/c/32858/3/src/include/string.h@183 PS3, Line 183: Parameter `s` and `*s` must be valid pointers. Resulting value is not specified when an `int` cannot hold enough digits for a given input.
https://review.coreboot.org/#/c/32858/3/src/include/string.h@184 PS3, Line 184: static inline Why not put this function to the `string.c`? In 2019, do we still have no LTO enabled in coreboot?