X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=copy.c;h=c225d1b0ff0a67e637f7200ab5c2a917b550af4f;hb=63f328290a0edda617c0881a356c07280fbba459;hp=08a3d388a4c312fca18558b2b8e5dcf027c7afaf;hpb=e94b4d2f2a3a9b2aaaac15c33d5d31f76531ecbf;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; } -