summaryrefslogtreecommitdiffstats
path: root/qacp.c
diff options
context:
space:
mode:
authorNate Straz <nstraz@redhat.com>2006-11-16 19:34:26 +0000
committerNathan Straz <nstraz@redhat.com>2008-09-23 09:37:46 -0400
commit30dd54286bf994015d578fc3c111002c12e6f21a (patch)
treee1d87b7838b203dc4b85d6b27febf5520bf9313d /qacp.c
parentaaf5cb39094bf87ac895210c4cf7f27d4483a3b9 (diff)
downloadqarsh-30dd54286bf994015d578fc3c111002c12e6f21a.tar.gz
qarsh-30dd54286bf994015d578fc3c111002c12e6f21a.tar.xz
qarsh-30dd54286bf994015d578fc3c111002c12e6f21a.zip
Cast off_t variables to long long int when printing so we don't get the
ugly warnings. We should always be compiling with 64-bit off_t's so this should not be a problem. Change nread and nwrote back to ssize_t's since that is what read and write return. nleft remains an off_t because we initialize to stat.st_size.
Diffstat (limited to 'qacp.c')
-rw-r--r--qacp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/qacp.c b/qacp.c
index ed5a973..4e809cd 100644
--- a/qacp.c
+++ b/qacp.c
@@ -226,9 +226,8 @@ qacp_recvonefile(const char *host, const char *srcfile, const char *destfile)
int insd;
int outfd;
char buf[BUFSIZ];
- ssize_t nread;
- ssize_t nwrote;
- ssize_t nleft;
+ ssize_t nread, nwrote;
+ off_t nleft;
struct qp_rstat_pkt *rstatp;
int rstaterrno;
@@ -284,8 +283,9 @@ qacp_recvonefile(const char *host, const char *srcfile, const char *destfile)
if (nleft != 0) {
unlink(destfile);
fprintf(stderr, "Short file transfer of %s, "
- "%lld bytes lost, wanted %lld\n", srcfile, nleft,
- rstatp->qp_st_size);
+ "%lld bytes lost, wanted %lld\n", srcfile,
+ (long long int)nleft,
+ (long long int)rstatp->qp_st_size);
}
close(sd);