}
}
+ if (len < 0) {
+ rprintf(FERROR, "read %s: %s\n",
+ full_fname(source), strerror(errno));
+ close(ifd);
+ close(ofd);
+ return -1;
+ }
+
if (close(ifd) < 0) {
rprintf(FINFO, "close failed on %s: %s\n",
full_fname(source), strerror(errno));
return -1;
}
- if (len < 0) {
- rprintf(FERROR,"read %s: %s\n",
- full_fname(source), strerror(errno));
- return -1;
- }
-
return 0;
}