summaryrefslogtreecommitdiff
path: root/util/cbfstool
diff options
context:
space:
mode:
authorzbao <fishbaozi@gmail.com>2013-01-08 10:10:16 +0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-01-08 04:00:30 +0100
commit062730d7cb35c8cc2cc07e15695eb62f2b647f4a (patch)
treee1079dfbc49ca96ab0cfc2dce1681f91ad8c42e3 /util/cbfstool
parent19f8756f0008cf74a472177642cc44f00c05934f (diff)
downloadcoreboot-062730d7cb35c8cc2cc07e15695eb62f2b647f4a.tar.xz
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>
Diffstat (limited to 'util/cbfstool')
-rw-r--r--util/cbfstool/cbfstool.c2
1 files changed, 1 insertions, 1 deletions
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);