small ipv6 doc changes; nslookup a tiny bit smaller
[oweals/busybox.git] / networking / ifupdown.c
index 00eb576f4b0a4db7e5492f4b5ac49bbaabb01917..ede2f8997a46980e09a8959ab92dec3cac79500b 100644 (file)
@@ -572,10 +572,7 @@ static char *next_word(char **buf)
        }
 
        /* Skip over leading whitespace */
-       word = *buf;
-       while (isspace(*word)) {
-               ++word;
-       }
+       word = skip_whitespace(*buf);
 
        /* Skip over comments */
        if (*word == '#') {
@@ -712,9 +709,7 @@ static struct interfaces_file_t *read_interfaces(const char *filename)
                        }
 
                        /* ship any trailing whitespace */
-                       while (isspace(*buf_ptr)) {
-                               ++buf_ptr;
-                       }
+                       buf_ptr = skip_whitespace(buf_ptr);
 
                        if (buf_ptr[0] != '\0') {
                                bb_error_msg("too many parameters \"%s\"", buf);
@@ -1099,7 +1094,6 @@ int ifupdown_main(int argc, char **argv)
        llist_t *target_list = NULL;
        const char *interfaces = "/etc/network/interfaces";
        int any_failures = 0;
-       int i;
 
        if (applet_name[2] == 'u') {
                /* ifup command */
@@ -1188,6 +1182,7 @@ int ifupdown_main(int argc, char **argv)
                        struct mapping_defn_t *currmap;
 
                        for (currmap = defn->mappings; currmap; currmap = currmap->next) {
+                               int i;
                                for (i = 0; i < currmap->n_matches; i++) {
                                        if (fnmatch(currmap->match[i], liface, 0) != 0)
                                                continue;