diff options
author | Mike Frysinger | 2006-04-16 05:54:31 +0000 |
---|---|---|
committer | Mike Frysinger | 2006-04-16 05:54:31 +0000 |
commit | 0436b9f482ec690c35488e8d5fc92a7100e0b21e (patch) | |
tree | 25d75b497ecaf89f7d996a5e1f0bca7bad0dfdcb /coreutils | |
parent | 78bd504947637b39c5f80134c553602b7dccf281 (diff) | |
download | busybox-0436b9f482ec690c35488e8d5fc92a7100e0b21e.zip busybox-0436b9f482ec690c35488e8d5fc92a7100e0b21e.tar.gz |
use strchr() not index()
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/sort.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/sort.c b/coreutils/sort.c index 98cea7c..60fc952 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c @@ -236,7 +236,7 @@ int sort_main(int argc, char **argv) bb_default_error_retval = 2; /* Parse command line options */ while((c=getopt(argc,argv,optlist))>0) { - line=index(optlist,c); + line=strchr(optlist,c); if(!line) bb_show_usage(); switch(*line) { #ifdef CONFIG_FEATURE_SORT_BIG @@ -267,7 +267,7 @@ int sort_main(int argc, char **argv) break; } /* no else needed: fall through to syntax error because comma isn't in optlist */ - temp2=index(optlist,*temp); + temp2=strchr(optlist,*temp); flag=(1<<(temp2-optlist)); if(!temp2 || (flag>FLAG_M && flag<FLAG_b)) bb_error_msg_and_die("Unknown key option."); |