{
error (0, errno, _("cannot create regular file %s"), quote (dst_path));
return_val = -1;
- goto ret2;
+ goto close_src_desc;
}
/* Find out the optimal buffer size. */
{
error (0, errno, _("cannot fstat %s"), quote (dst_path));
return_val = -1;
- goto ret;
+ goto close_src_and_dst_desc;
}
buf_size = ST_BLKSIZE (sb);
{
error (0, errno, _("cannot fstat %s"), quote (src_path));
return_val = -1;
- goto ret;
+ goto close_src_and_dst_desc;
}
/* If the file has fewer blocks than would normally
#endif
error (0, errno, _("reading %s"), quote (src_path));
return_val = -1;
- goto ret;
+ goto close_src_and_dst_desc;
}
if (n_read == 0)
break;
{
error (0, errno, _("cannot lseek %s"), quote (dst_path));
return_val = -1;
- goto ret;
+ goto close_src_and_dst_desc;
}
last_write_made_hole = 1;
}
{
error (0, errno, _("writing %s"), quote (dst_path));
return_val = -1;
- goto ret;
+ goto close_src_and_dst_desc;
}
last_write_made_hole = 0;
}
}
}
-ret:
+close_src_and_dst_desc:
if (close (dest_desc) < 0)
{
error (0, errno, _("closing %s"), quote (dst_path));
return_val = -1;
}
-ret2:
+close_src_desc:
if (close (source_desc) < 0)
{
error (0, errno, _("closing %s"), quote (src_path));