traceroute: fix help text to not show -6 when traceroute6 is off
[oweals/busybox.git] / shell / lash_unused.c
index 708408954c256eb31db54c7bcfea4e7c4686039d..107ce88f6221379a69d439140d3dbf4943471c2b 100644 (file)
@@ -312,8 +312,9 @@ static int builtin_help(struct child_prog UNUSED_PARAM *dummy)
 {
        const struct built_in_command *x;
 
-       printf("\nBuilt-in commands:\n"
-              "-------------------\n");
+       printf(
+               "Built-in commands:\n"
+               "------------------\n");
        for (x = bltins; x <= &VEC_LAST(bltins); x++) {
                if (x->descr == NULL)
                        continue;
@@ -696,7 +697,7 @@ static char * strsep_space(char *string, int * ix)
 
        /* Find the end of any whitespace trailing behind
         * the token and let that be part of the token */
-       while (string[*ix] && (isspace)(string[*ix]) ) {
+       while (string[*ix] && isspace(string[*ix])) {
                (*ix)++;
        }
 
@@ -840,7 +841,7 @@ static int expand_arguments(char *command)
                                num_skip_chars = 1;
                        } else {
                                src = dst + 1;
-                               while ((isalnum)(*src) || *src == '_') src++;
+                               while (isalnum(*src) || *src == '_') src++;
                        }
                        if (src == NULL) {
                                src = dst+dstlen;
@@ -1513,7 +1514,7 @@ int lash_main(int argc, char **argv)
 
        if (global_argv[0] && global_argv[0][0] == '-') {
                FILE *prof_input;
-               prof_input = fopen("/etc/profile", "r");
+               prof_input = fopen_for_read("/etc/profile");
                if (prof_input) {
                        llist_add_to(&close_me_list, (void *)(long)fileno(prof_input));
                        /* Now run the file */
@@ -1553,7 +1554,7 @@ int lash_main(int argc, char **argv)
                }
        } else if (!local_pending_command && global_argv[optind]) {
                //printf( "optind=%d  argv[optind]='%s'\n", optind, argv[optind]);
-               input = xfopen(global_argv[optind], "r");
+               input = xfopen_for_read(global_argv[optind]);
                /* be lazy, never mark this closed */
                llist_add_to(&close_me_list, (void *)(long)fileno(input));
        }