diff options
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 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."); |