Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32901 )
Change subject: string.h: Move common string functions into .c file ......................................................................
Patch Set 1:
(4 comments)
https://review.coreboot.org/#/c/32901/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/32901/1//COMMIT_MSG@16 PS1, Line 16: collapsable
collapsible
Done
https://review.coreboot.org/#/c/32901/1//COMMIT_MSG@18 PS1, Line 18: Also clarified
Also, clarified […]
I disagree. The "also" is not conjunctive here. Instead, this sentence is a shortened form of "I also clarified ...", so there should be no comma.
https://review.coreboot.org/#/c/32901/1/src/lib/string.c File src/lib/string.c:
https://review.coreboot.org/#/c/32901/1/src/lib/string.c@50 PS1, Line 50: char *strchr(const char *s, int c) : { : for (; *s; s++) { : if (*s == c) : return (char *)s; : } : return NULL; : } : : char *strrchr(const char *s, int c) : { : char *p = NULL; : : for (; *s; s++) : if (*s == c) : p = (char *)s; : : return p; : }
These two seem wrong. […]
True, that's a bug in the old implementations already. Fixed.
https://review.coreboot.org/#/c/32901/1/src/lib/string.c@72 PS1, Line 72: register char *ret = to; : register char data;
`register` is an anachronism, better just drop it
Sure... I mean, I just moved the existing implementations around here. But I can take it out if you want.