gitweb: Handle non UTF-8 text better
[gitweb.git] / copy.c
diff --git a/copy.c b/copy.c
index 08a3d388a4c312fca18558b2b8e5dcf027c7afaf..d340bb253ec35af379c29e71f384e15d6822fb9a 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -3,10 +3,9 @@
 int copy_fd(int ifd, int ofd)
 {
        while (1) {
-               int len;
                char buffer[8192];
                char *buf = buffer;
-               len = xread(ifd, buffer, sizeof(buffer));
+               ssize_t len = xread(ifd, buffer, sizeof(buffer));
                if (!len)
                        break;
                if (len < 0) {