summaryrefslogtreecommitdiffstats
path: root/bin/cp/utils.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2002-07-03 16:35:20 +0000
committermarkm <markm@FreeBSD.org>2002-07-03 16:35:20 +0000
commit837d0142a4a889014d6b9f91e7a690a16c1fdbbc (patch)
treef4d895e73e5b08d4d5c30ef86fd743c26398279b /bin/cp/utils.c
parent329abc1b039926621c76b83303d8a55a2ad61125 (diff)
downloadFreeBSD-src-837d0142a4a889014d6b9f91e7a690a16c1fdbbc.zip
FreeBSD-src-837d0142a4a889014d6b9f91e7a690a16c1fdbbc.tar.gz
Fix some low-hanging lint-fruit: endianness and staticness warnings.
Diffstat (limited to 'bin/cp/utils.c')
-rw-r--r--bin/cp/utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index f894c00..a10daa9 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -62,7 +62,9 @@ copy_file(FTSENT *entp, int dne)
{
static char buf[MAXBSIZE];
struct stat *fs;
- int ch, checkch, from_fd, rcount, rval, to_fd, wcount, wresid;
+ int ch, checkch, from_fd, rcount, rval, to_fd;
+ ssize_t wcount;
+ size_t wresid;
char *bufp;
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
char *p;
@@ -132,7 +134,7 @@ copy_file(FTSENT *entp, int dne)
rval = 1;
} else {
for (bufp = p, wresid = fs->st_size; ;
- bufp += wcount, wresid -= wcount) {
+ bufp += wcount, wresid -= (size_t)wcount) {
wcount = write(to_fd, bufp, wresid);
if (wcount >= wresid || wcount <= 0)
break;
OpenPOWER on IntegriCloud