X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=copy.c;h=c225d1b0ff0a67e637f7200ab5c2a917b550af4f;hb=b57321f57b324320bdcf9f453ec4788da166f8f4;hp=08a3d388a4c312fca18558b2b8e5dcf027c7afaf;hpb=3ed02de2f46105cbc45fcc8f3287513f470eb4a3;p=git.git diff --git a/copy.c b/copy.c index 08a3d388a..c225d1b0f 100644 --- 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) { @@ -35,4 +34,3 @@ int copy_fd(int ifd, int ofd) close(ifd); return 0; } -