aboutsummaryrefslogtreecommitdiffstats
path: root/fileio.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2006-04-08 16:37:50 +0000
committerWayne Davison <wayned@samba.org>2006-04-08 16:37:50 +0000
commite3db43ffe5a20739970785fcd57bc220ea5b536d (patch)
tree4c5a6328889427653998fb82fe2f4b3124410992 /fileio.c
parentf61ab01d9630d892b77770f7bbf7e068dc33ae2e (diff)
downloadandroid_external_rsync-e3db43ffe5a20739970785fcd57bc220ea5b536d.tar.gz
android_external_rsync-e3db43ffe5a20739970785fcd57bc220ea5b536d.tar.bz2
android_external_rsync-e3db43ffe5a20739970785fcd57bc220ea5b536d.zip
Fixed the value of map->p_fd_offset when a read() fails or is
abbreviated.
Diffstat (limited to 'fileio.c')
-rw-r--r--fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fileio.c b/fileio.c
index 18062091..bef7603f 100644
--- a/fileio.c
+++ b/fileio.c
@@ -232,7 +232,6 @@ char *map_ptr(struct map_struct *map, OFF_T offset, int32 len)
}
map->p_fd_offset = read_start;
}
- map->p_fd_offset += read_size;
map->p_offset = window_start;
map->p_len = window_size;
@@ -246,6 +245,7 @@ char *map_ptr(struct map_struct *map, OFF_T offset, int32 len)
memset(map->p + read_offset, 0, read_size);
break;
}
+ map->p_fd_offset += nread;
read_offset += nread;
read_size -= nread;
}