diff options
Diffstat (limited to 'coreutils/yes.c')
-rw-r--r-- | coreutils/yes.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/coreutils/yes.c b/coreutils/yes.c index 269d2a0..9d3f675 100644 --- a/coreutils/yes.c +++ b/coreutils/yes.c @@ -21,22 +21,21 @@ int yes_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int yes_main(int argc, char **argv) { - char **first_arg; + char **pp; argv[0] = (char*)"y"; if (argc != 1) { ++argv; } - first_arg = argv; do { + pp = argv; while (1) { - fputs(*argv, stdout); - if (!*++argv) + fputs(*pp, stdout); + if (!*++pp) break; putchar(' '); } - argv = first_arg; } while (putchar('\n') != EOF); bb_perror_nomsg_and_die(); |