cbfstool: index is replaced by strchr.

From index(3):
CONFORMING TO 4.3BSD; marked as LEGACY in POSIX.1-2001. POSIX.1-2008
removes the specifications of index() and rindex(), recommending
strchr(3) and strrchr(3) instead.

Change-Id: I3899b9ca9196dbbf2d147a38dacd7e742a3873fe
Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Signed-off-by: zbao <fishbaozi@gmail.com>
Reviewed-on: http://review.coreboot.org/2112
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
zbao 2013-01-08 10:10:16 +08:00 committed by Stefan Reinauer
parent 19f8756f00
commit 062730d7cb
1 changed files with 1 additions and 1 deletions

View File

@ -563,7 +563,7 @@ int main(int argc, char **argv)
break;
/* filter out illegal long options */
if (index(commands[i].optstring, c) == NULL) {
if (strchr(commands[i].optstring, c) == NULL) {
/* TODO maybe print actual long option instead */
printf("%s: invalid option -- '%c'\n",
argv[0], c);