diff options
| author | vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-04-16 05:54:31 +0000 |
|---|---|---|
| committer | vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-04-16 05:54:31 +0000 |
| commit | aeadbf93fe6a1de2258e924e149cb336bcfe4c9d (patch) | |
| tree | 25d75b497ecaf89f7d996a5e1f0bca7bad0dfdcb | |
| parent | 5b3515d2d26294f70672efafc19abfe08487c216 (diff) | |
| download | busybox-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
| -rw-r--r-- | coreutils/sort.c | 4 | ||||
| -rw-r--r-- | loginutils/deluser.c | 2 | ||||
| -rw-r--r-- | 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) | |||
| 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."); |
diff --git a/loginutils/deluser.c b/loginutils/deluser.c index b647537d9..1b9bc4439 100644 --- a/loginutils/deluser.c +++ b/loginutils/deluser.c | |||
| @@ -43,7 +43,7 @@ static inline Bounds boundary(const char *buffer, const char *login) | |||
| 43 | } | 43 | } |
| 44 | start++; | 44 | start++; |
| 45 | 45 | ||
| 46 | stop = index(start, '\n'); /* index is a BSD-ism */ | 46 | stop = strchr(start, '\n'); |
| 47 | b.start = start - buffer; | 47 | b.start = start - buffer; |
| 48 | b.stop = stop - buffer; | 48 | b.stop = stop - buffer; |
| 49 | return b; | 49 | return b; |
diff --git a/scripts/config/lxdialog/util.c b/scripts/config/lxdialog/util.c index 47afa5e6a..1e4b662c0 100644 --- a/scripts/config/lxdialog/util.c +++ b/scripts/config/lxdialog/util.c | |||
| @@ -221,7 +221,7 @@ print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x) | |||
| 221 | newl = 1; | 221 | newl = 1; |
| 222 | word = tempstr; | 222 | word = tempstr; |
| 223 | while (word && *word) { | 223 | while (word && *word) { |
| 224 | sp = index(word, ' '); | 224 | sp = strchr(word, ' '); |
| 225 | if (sp) | 225 | if (sp) |
| 226 | *sp++ = 0; | 226 | *sp++ = 0; |
| 227 | 227 | ||
| @@ -232,7 +232,7 @@ print_autowrap (WINDOW * win, const char *prompt, int width, int y, int x) | |||
| 232 | wlen = strlen(word); | 232 | wlen = strlen(word); |
| 233 | if (wlen > room || | 233 | if (wlen > room || |
| 234 | (newl && wlen < 4 && sp && wlen+1+strlen(sp) > room | 234 | (newl && wlen < 4 && sp && wlen+1+strlen(sp) > room |
| 235 | && (!(sp2 = index(sp, ' ')) || wlen+1+(sp2-sp) > room))) { | 235 | && (!(sp2 = strchr(sp, ' ')) || wlen+1+(sp2-sp) > room))) { |
| 236 | cur_y++; | 236 | cur_y++; |
| 237 | cur_x = x; | 237 | cur_x = x; |
| 238 | } | 238 | } |
