aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-25 12:46:03 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-10-25 12:46:03 +0000
commit656a38a371988abbeb559f89737f222dae1ebbd2 (patch)
tree5f3775e14e05880c7977402384756e6ca3102096 /networking
parent7488dd85691d795666d82ff00f803bbdd92e5f5d (diff)
downloadbusybox-w32-656a38a371988abbeb559f89737f222dae1ebbd2.tar.gz
busybox-w32-656a38a371988abbeb559f89737f222dae1ebbd2.tar.bz2
busybox-w32-656a38a371988abbeb559f89737f222dae1ebbd2.zip
use skip_whitespace where appropriate
git-svn-id: svn://busybox.net/trunk/busybox@16435 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'networking')
-rw-r--r--networking/ifupdown.c9
-rw-r--r--networking/wget.c2
2 files changed, 3 insertions, 8 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 45407f9f4..ede2f8997 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -572,10 +572,7 @@ static char *next_word(char **buf)
572 } 572 }
573 573
574 /* Skip over leading whitespace */ 574 /* Skip over leading whitespace */
575 word = *buf; 575 word = skip_whitespace(*buf);
576 while (isspace(*word)) {
577 ++word;
578 }
579 576
580 /* Skip over comments */ 577 /* Skip over comments */
581 if (*word == '#') { 578 if (*word == '#') {
@@ -712,9 +709,7 @@ static struct interfaces_file_t *read_interfaces(const char *filename)
712 } 709 }
713 710
714 /* ship any trailing whitespace */ 711 /* ship any trailing whitespace */
715 while (isspace(*buf_ptr)) { 712 buf_ptr = skip_whitespace(buf_ptr);
716 ++buf_ptr;
717 }
718 713
719 if (buf_ptr[0] != '\0') { 714 if (buf_ptr[0] != '\0') {
720 bb_error_msg("too many parameters \"%s\"", buf); 715 bb_error_msg("too many parameters \"%s\"", buf);
diff --git a/networking/wget.c b/networking/wget.c
index a0d3e15e8..090b58d9a 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -302,7 +302,7 @@ int wget_main(int argc, char **argv)
302 302
303 s = buf; 303 s = buf;
304 while (*s != '\0' && !isspace(*s)) ++s; 304 while (*s != '\0' && !isspace(*s)) ++s;
305 while (isspace(*s)) ++s; 305 s = skip_whitespace(s);
306 // FIXME: no error check 306 // FIXME: no error check
307 // xatou wouldn't work: "200 OK" 307 // xatou wouldn't work: "200 OK"
308 status = atoi(s); 308 status = atoi(s);