glossary typofix
[gitweb.git] / sha1_file.c
index 53e25f278c6193860431f63a3c9de97f4e347f27..2a5be53faca4524f5a70e6e928044ba3aa402d8f 100644 (file)
@@ -1618,12 +1618,7 @@ int move_temp_to_file(const char *tmpfile, const char *filename)
 
 static int write_buffer(int fd, const void *buf, size_t len)
 {
-       ssize_t size;
-
-       size = write_in_full(fd, buf, len);
-       if (!size)
-               return error("file write: disk full");
-       if (size < 0)
+       if (write_in_full(fd, buf, len) < 0)
                return error("file write error (%s)", strerror(errno));
        return 0;
 }