diff options
Diffstat (limited to 'coreutils/tee.c')
-rw-r--r-- | coreutils/tee.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/coreutils/tee.c b/coreutils/tee.c index 8db9042..2e1e367 100644 --- a/coreutils/tee.c +++ b/coreutils/tee.c @@ -70,8 +70,8 @@ int tee_main(int argc, char **argv) while ((c = safe_read(STDIN_FILENO, buf, sizeof(buf))) > 0) { fp = files; do - fwrite(buf, 1, c, *fp++); - while (*fp); + fwrite(buf, 1, c, *fp); + while (*++fp); } if (c < 0) { /* Make sure read errors are signaled. */ retval = EXIT_FAILURE; @@ -81,8 +81,8 @@ int tee_main(int argc, char **argv) while ((c = getchar()) != EOF) { fp = files; do - putc(c, *fp++); - while (*fp); + putc(c, *fp); + while (*++fp); } #endif |