aboutsummaryrefslogtreecommitdiffstats
path: root/checksum.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2014-04-19 16:26:35 -0700
committerWayne Davison <wayned@samba.org>2014-04-19 16:26:35 -0700
commit43d6d0c5ba63e3a69717702a1d58ea6a04192bb4 (patch)
tree0b9cd307066640429ed58660f5771afcd3562c6d /checksum.c
parent22a3ac0b5538ec6c1ff222570413cbdb74fef67b (diff)
downloadandroid_external_rsync-43d6d0c5ba63e3a69717702a1d58ea6a04192bb4.tar.gz
android_external_rsync-43d6d0c5ba63e3a69717702a1d58ea6a04192bb4.tar.bz2
android_external_rsync-43d6d0c5ba63e3a69717702a1d58ea6a04192bb4.zip
Change args to file_checksum() to prepare for future changes.
Diffstat (limited to 'checksum.c')
-rw-r--r--checksum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/checksum.c b/checksum.c
index 24c21321..a1c2aa24 100644
--- a/checksum.c
+++ b/checksum.c
@@ -98,10 +98,10 @@ void get_checksum2(char *buf, int32 len, char *sum)
}
}
-void file_checksum(char *fname, char *sum, OFF_T size)
+void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
{
struct map_struct *buf;
- OFF_T i, len = size;
+ OFF_T i, len = st_p->st_size;
md_context m;
int32 remainder;
int fd;
@@ -112,7 +112,7 @@ void file_checksum(char *fname, char *sum, OFF_T size)
if (fd == -1)
return;
- buf = map_file(fd, size, MAX_MAP_SIZE, CSUM_CHUNK);
+ buf = map_file(fd, len, MAX_MAP_SIZE, CSUM_CHUNK);
if (protocol_version >= 30) {
md5_begin(&m);