summaryrefslogtreecommitdiffstats
path: root/bin/cp
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2002-07-31 16:52:16 +0000
committermarkm <markm@FreeBSD.org>2002-07-31 16:52:16 +0000
commit7726f590e76ed6b044f3241153ee1fea90aed1a6 (patch)
treea69345ef05c6754c27e84651c8b012db33df2ec1 /bin/cp
parent80ff821584cb31d63941a00fd81d828ebe5d50a9 (diff)
downloadFreeBSD-src-7726f590e76ed6b044f3241153ee1fea90aed1a6.zip
FreeBSD-src-7726f590e76ed6b044f3241153ee1fea90aed1a6.tar.gz
Fix some easy WARNS.
Diffstat (limited to 'bin/cp')
-rw-r--r--bin/cp/utils.c8
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;
OpenPOWER on IntegriCloud