aboutsummaryrefslogtreecommitdiff
path: root/coreutils/yes.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/yes.c')
-rw-r--r--coreutils/yes.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/coreutils/yes.c b/coreutils/yes.c
index 269d2a0c2..9d3f67550 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();