aboutsummaryrefslogtreecommitdiffstats
path: root/receiver.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-11-09 18:46:55 -0800
committerWayne Davison <wayned@samba.org>2008-11-09 18:56:21 -0800
commit9411292489496984c8d5d9a446bf071afac3866d (patch)
treea68d29f7e1387a01ecbd0daaff821b3fe3d3b799 /receiver.c
parentb4de848d75b5bc289f13c4f47a4f78d4c876b1a2 (diff)
downloadandroid_external_rsync-9411292489496984c8d5d9a446bf071afac3866d.tar.gz
android_external_rsync-9411292489496984c8d5d9a446bf071afac3866d.tar.bz2
android_external_rsync-9411292489496984c8d5d9a446bf071afac3866d.zip
Fixed a bunch of "warn_unused_result" compiler warnings.
Diffstat (limited to 'receiver.c')
-rw-r--r--receiver.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/receiver.c b/receiver.c
index 91642478..7efd3d27 100644
--- a/receiver.c
+++ b/receiver.c
@@ -285,8 +285,12 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
goto report_write_error;
#ifdef HAVE_FTRUNCATE
- if (inplace && fd != -1)
- ftruncate(fd, offset);
+ if (inplace && fd != -1) {
+ if (ftruncate(fd, offset) < 0) {
+ rsyserr(FWARNING, errno, "ftruncate failed on %s",
+ full_fname(fname));
+ }
+ }
#endif
if (INFO_GTE(PROGRESS, 1))