diff options
Diffstat (limited to 'coreutils')
| -rw-r--r-- | coreutils/ls.c | 3 | ||||
| -rw-r--r-- | coreutils/tee.c | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c index cbfcfc7a1..e69f1afd9 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
| @@ -573,7 +573,8 @@ static unsigned print_name(const char *name) | |||
| 573 | putchar('\\'); | 573 | putchar('\\'); |
| 574 | len++; | 574 | len++; |
| 575 | } | 575 | } |
| 576 | putchar(*name++); | 576 | putchar(*name); |
| 577 | name++; | ||
| 577 | } | 578 | } |
| 578 | putchar('"'); | 579 | putchar('"'); |
| 579 | return len; | 580 | return len; |
diff --git a/coreutils/tee.c b/coreutils/tee.c index 8db9042aa..2e1e367f2 100644 --- a/coreutils/tee.c +++ b/coreutils/tee.c | |||
| @@ -70,8 +70,8 @@ int tee_main(int argc, char **argv) | |||
| 70 | while ((c = safe_read(STDIN_FILENO, buf, sizeof(buf))) > 0) { | 70 | while ((c = safe_read(STDIN_FILENO, buf, sizeof(buf))) > 0) { |
| 71 | fp = files; | 71 | fp = files; |
| 72 | do | 72 | do |
| 73 | fwrite(buf, 1, c, *fp++); | 73 | fwrite(buf, 1, c, *fp); |
| 74 | while (*fp); | 74 | while (*++fp); |
| 75 | } | 75 | } |
| 76 | if (c < 0) { /* Make sure read errors are signaled. */ | 76 | if (c < 0) { /* Make sure read errors are signaled. */ |
| 77 | retval = EXIT_FAILURE; | 77 | retval = EXIT_FAILURE; |
| @@ -81,8 +81,8 @@ int tee_main(int argc, char **argv) | |||
| 81 | while ((c = getchar()) != EOF) { | 81 | while ((c = getchar()) != EOF) { |
| 82 | fp = files; | 82 | fp = files; |
| 83 | do | 83 | do |
| 84 | putc(c, *fp++); | 84 | putc(c, *fp); |
| 85 | while (*fp); | 85 | while (*++fp); |
| 86 | } | 86 | } |
| 87 | #endif | 87 | #endif |
| 88 | 88 | ||
