Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41420 )
Change subject: lib: Add strtok() and strtok_r() ......................................................................
Patch Set 6:
(2 comments)
https://review.coreboot.org/c/coreboot/+/41420/3/src/lib/string.c File src/lib/string.c:
https://review.coreboot.org/c/coreboot/+/41420/3/src/lib/string.c@8 PS3, Line 8: strtok_global
*strtok_global
Am I missing something or is this also a serious bug in libpayload? Did this ever work or is it just that nobody ever used this? (I guess strsep() is just the generally more popular variant? Should we even add strtok() to coreboot then?)
Can someone please fix this in libpayload too?
https://review.coreboot.org/c/coreboot/+/41420/3/src/lib/string.c@194 PS3, Line 194: char *start
Done
Just want to add that as far as I know, we have no rule against C99 declarations in coreboot. I use them all the time because I think they tend to be easier to read. Doesn't mean there's anything wrong with writing this function with C90 declarations, I think we just generally leave that up to the author.