Alex Thiessen 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 https://review.coreboot.org/#/c/32901/1//COMMIT_MSG@18 PS1, Line 18: Also clarified Also, clarified https://writing.wisc.edu/handbook/grammarpunct/conjadv 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. If `c` is 0, then pointer to the terminating zero must be returned, instead NULL would be returned. 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 -- To view, visit https://review.coreboot.org/c/coreboot/+/32901 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: I88166ba9876e94dfa3cfc06969c78a9e1bc6fc36 Gerrit-Change-Number: 32901 Gerrit-PatchSet: 1 Gerrit-Owner: Julius Werner <jwerner@chromium.org> Gerrit-Reviewer: Alex Thiessen <alex.thiessen.de+coreboot@gmail.com> Gerrit-Reviewer: Julius Werner <jwerner@chromium.org> Gerrit-Reviewer: Martin Roth <martinroth@google.com> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> Gerrit-Comment-Date: Tue, 21 May 2019 23:12:52 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment