diff options
Diffstat (limited to 'bin/cp/utils.c')
-rw-r--r-- | bin/cp/utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 364f983..ab92dfc 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -140,10 +140,10 @@ copy_file(FTSENT *entp, int dne) for (bufp = p, wresid = fs->st_size; ; bufp += wcount, wresid -= (size_t)wcount) { wcount = write(to_fd, bufp, wresid); - if (wcount >= wresid || wcount <= 0) + if (wcount >= (ssize_t)wresid || wcount <= 0) break; } - if (wcount != wresid) { + if (wcount != (ssize_t)wresid) { warn("%s", to.p_path); rval = 1; } @@ -160,10 +160,10 @@ copy_file(FTSENT *entp, int dne) for (bufp = buf, wresid = rcount; ; bufp += wcount, wresid -= wcount) { wcount = write(to_fd, bufp, wresid); - if (wcount >= wresid || wcount <= 0) + if (wcount >= (ssize_t)wresid || wcount <= 0) break; } - if (wcount != wresid) { + if (wcount != (ssize_t)wresid) { warn("%s", to.p_path); rval = 1; break; |