xsize_t: check whether we lose bits
[gitweb.git] / write_or_die.c
index 046e79d485feaa26d305868012f73b04088366b6..5c4bc8515ab9484131de7e065e08657315004f8c 100644 (file)
@@ -23,7 +23,7 @@ int write_in_full(int fd, const void *buf, size_t count)
        ssize_t total = 0;
 
        while (count > 0) {
-               size_t written = xwrite(fd, p, count);
+               ssize_t written = xwrite(fd, p, count);
                if (written < 0)
                        return -1;
                if (!written) {