summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoern Engel <joern@logfs.org>2012-05-06 18:42:40 -0700
committerJoern Engel <joern@logfs.org>2012-05-06 18:42:40 -0700
commita4bbca7625c7bd45a338222784495eb0330c057c (patch)
tree9b8400cd7a2de4b12d15c4eb7e602e0342d3519c
parent54c6b7459fd1492db140b245149fc53f3f416a2b (diff)
downloadcancd-a4bbca7625c7bd45a338222784495eb0330c057c.tar.gz
Fix do_write
After about four month, we never noticed this rather obvious bug. Tells you something about the frequency of short writes. Signed-off-by: Joern Engel <joern@logfs.org>
-rw-r--r--cancd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cancd.c b/cancd.c
index c3cb760..4aff4fa 100644
--- a/cancd.c
+++ b/cancd.c
@@ -311,6 +311,7 @@ static int do_write(int fd, const void *buf, size_t count)
if (ret < 0)
return ret;
count -= ret;
+ buf += ret;
} while (count);
return 0;
}