aboutsummaryrefslogtreecommitdiff
path: root/coreutils/sort.c
diff options
context:
space:
mode:
authorvapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-04-16 05:54:31 +0000
committervapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-04-16 05:54:31 +0000
commitaeadbf93fe6a1de2258e924e149cb336bcfe4c9d (patch)
tree25d75b497ecaf89f7d996a5e1f0bca7bad0dfdcb /coreutils/sort.c
parent5b3515d2d26294f70672efafc19abfe08487c216 (diff)
downloadbusybox-w32-aeadbf93fe6a1de2258e924e149cb336bcfe4c9d.tar.gz
busybox-w32-aeadbf93fe6a1de2258e924e149cb336bcfe4c9d.tar.bz2
busybox-w32-aeadbf93fe6a1de2258e924e149cb336bcfe4c9d.zip
use strchr() not index()
git-svn-id: svn://busybox.net/trunk/busybox@14885 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils/sort.c')
-rw-r--r--coreutils/sort.c4
1 files changed, 2 insertions, 2 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)
236 bb_default_error_retval = 2; 236 bb_default_error_retval = 2;
237 /* Parse command line options */ 237 /* Parse command line options */
238 while((c=getopt(argc,argv,optlist))>0) { 238 while((c=getopt(argc,argv,optlist))>0) {
239 line=index(optlist,c); 239 line=strchr(optlist,c);
240 if(!line) bb_show_usage(); 240 if(!line) bb_show_usage();
241 switch(*line) { 241 switch(*line) {
242#ifdef CONFIG_FEATURE_SORT_BIG 242#ifdef CONFIG_FEATURE_SORT_BIG
@@ -267,7 +267,7 @@ int sort_main(int argc, char **argv)
267 break; 267 break;
268 } /* no else needed: fall through to syntax error 268 } /* no else needed: fall through to syntax error
269 because comma isn't in optlist */ 269 because comma isn't in optlist */
270 temp2=index(optlist,*temp); 270 temp2=strchr(optlist,*temp);
271 flag=(1<<(temp2-optlist)); 271 flag=(1<<(temp2-optlist));
272 if(!temp2 || (flag>FLAG_M && flag<FLAG_b)) 272 if(!temp2 || (flag>FLAG_M && flag<FLAG_b))
273 bb_error_msg_and_die("Unknown key option."); 273 bb_error_msg_and_die("Unknown key option.");