summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-08-27 08:33:35 +0000
committerJim Meyering <jim@meyering.net>2000-08-27 08:33:35 +0000
commita24688898762646670a02adc5032df7c701dbd49 (patch)
tree0b3e9985946ba624e7d6d1b455117dc0afc6c35c /src
parent5f4e35a42aeb3d782a4b71a868d0d574a04026c0 (diff)
downloadcoreutils-a24688898762646670a02adc5032df7c701dbd49.tar.xz
(copy_reg): Rename two goto labels.
Diffstat (limited to 'src')
-rw-r--r--src/copy.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/copy.c b/src/copy.c
index 642126a34..a05c546c8 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -207,7 +207,7 @@ copy_reg (const char *src_path, const char *dst_path,
{
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. */
@@ -216,7 +216,7 @@ copy_reg (const char *src_path, const char *dst_path,
{
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);
@@ -231,7 +231,7 @@ copy_reg (const char *src_path, const char *dst_path,
{
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
@@ -258,7 +258,7 @@ copy_reg (const char *src_path, const char *dst_path,
#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;
@@ -292,7 +292,7 @@ copy_reg (const char *src_path, const char *dst_path,
{
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;
}
@@ -306,7 +306,7 @@ copy_reg (const char *src_path, const char *dst_path,
{
error (0, errno, _("writing %s"), quote (dst_path));
return_val = -1;
- goto ret;
+ goto close_src_and_dst_desc;
}
last_write_made_hole = 0;
}
@@ -333,13 +333,13 @@ copy_reg (const char *src_path, const char *dst_path,
}
}
-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));