aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/dd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 9d173cc13..38b2a6aa1 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -202,8 +202,10 @@ static bool write_and_stats(const void *buf, size_t len, size_t obs,
G.out_full++;
return 0;
}
- if (n) /* > 0 */
+ if ((size_t)n == len) {
G.out_part++;
+ return 0;
+ }
return 1;
}