Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed a bunch of "warn_unused_result" compiler warnings.
[rsync/rsync.git]
/
receiver.c
diff --git
a/receiver.c
b/receiver.c
index
9164247
..
7efd3d2
100644
(file)
--- 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
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))
#endif
if (INFO_GTE(PROGRESS, 1))