diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c index 102220de80..701e1b8f94 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1702,11 +1702,12 @@ write_chunks_to_file_impl(const char *fname, const smartlist_t *chunks, SMARTLIST_FOREACH(chunks, sized_chunk_t *, chunk, { result = write_all(fd, chunk->bytes, chunk->len, 0); - if (result < 0 || (size_t)result != chunk->len) { + if (result < 0) { log(LOG_WARN, LD_FS, "Error writing to \"%s\": %s", fname, strerror(errno)); goto err; } + tor_assert((size_t)result == chunk->len); }); return finish_writing_to_file(file); |