nfs-cp change uint64_t to size_t for the read/write wrappers

libnfs-4.0.0-vitalif
sahlberg 2016-09-21 11:30:15 -07:00
parent 2ff6131244
commit 8c8e615e54
1 changed files with 7 additions and 7 deletions

View File

@ -114,8 +114,8 @@ fstat_file(struct file_context *fc, struct stat *st)
}
}
static int64_t
file_pread(struct file_context *fc, char *buf, int64_t count, uint64_t off)
static ssize_t
file_pread(struct file_context *fc, char *buf, size_t count, off_t off)
{
if (fc->is_nfs == 0) {
lseek(fc->fd, off, SEEK_SET);
@ -125,8 +125,8 @@ file_pread(struct file_context *fc, char *buf, int64_t count, uint64_t off)
}
}
static int64_t
file_pwrite(struct file_context *fc, char *buf, int64_t count, uint64_t off)
static ssize_t
file_pwrite(struct file_context *fc, char *buf, size_t count, off_t off)
{
if (fc->is_nfs == 0) {
lseek(fc->fd, off, SEEK_SET);
@ -217,8 +217,8 @@ int main(int argc, char *argv[])
struct stat st;
struct file_context *src;
struct file_context *dst;
uint64_t off;
int64_t count;
off_t off;
ssize_t count;
#ifdef WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != 0) {
@ -257,7 +257,7 @@ int main(int argc, char *argv[])
off = 0;
while (off < st.st_size) {
count = st.st_size - off;
count = (size_t)(st.st_size - off);
if (count > BUFSIZE) {
count = BUFSIZE;
}