From 062730d7cb35c8cc2cc07e15695eb62f2b647f4a Mon Sep 17 00:00:00 2001 From: zbao Date: Tue, 8 Jan 2013 10:10:16 +0800 Subject: 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 Signed-off-by: zbao Reviewed-on: http://review.coreboot.org/2112 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/cbfstool/cbfstool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index 6b520628f1..4202801471 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -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); -- cgit v1.2.3