From 0436b9f482ec690c35488e8d5fc92a7100e0b21e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 16 Apr 2006 05:54:31 +0000 Subject: [PATCH] use strchr() not index() --- coreutils/sort.c | 4 ++-- loginutils/deluser.c | 2 +- scripts/config/lxdialog/util.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/coreutils/sort.c b/coreutils/sort.c index 98cea7cd7..60fc95222 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 room || (newl && wlen < 4 && sp && wlen+1+strlen(sp) > room - && (!(sp2 = index(sp, ' ')) || wlen+1+(sp2-sp) > room))) { + && (!(sp2 = strchr(sp, ' ')) || wlen+1+(sp2-sp) > room))) { cur_y++; cur_x = x; } -- 2.25.1