summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-05-30 07:49:56 +0000
committerJim Meyering <jim@meyering.net>2002-05-30 07:49:56 +0000
commite913eebe7c8331a271d5d9db70fcd47da76e4287 (patch)
tree8aae18ad9bd1c0aa59705710c492dde79b808bf5 /src
parent79278d0cadfae8232a7ad396daf042ca3a78c924 (diff)
downloadcoreutils-e913eebe7c8331a271d5d9db70fcd47da76e4287.tar.xz
(copy_reg): Use a temporary to avoid a warning
from gcc -W about comparison between signed and unsigned. (copy_internal): Likewise, but use a cast.
Diffstat (limited to 'src')
-rw-r--r--src/copy.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/copy.c b/src/copy.c
index 0330a2bea..ea83afac7 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -367,7 +367,8 @@ copy_reg (const char *src_path, const char *dst_path,
}
if (ip == 0)
{
- if (full_write (dest_desc, buf, n_read) != n_read)
+ size_t n = n_read;
+ if (full_write (dest_desc, buf, n) != n)
{
error (0, errno, _("writing %s"), quote (dst_path));
return_val = -1;
@@ -1415,7 +1416,7 @@ copy_internal (const char *src_path, const char *dst_path,
char *dest_link_val = (char *) alloca (src_link_len + 1);
int dest_link_len = readlink (dst_path, dest_link_val,
src_link_len + 1);
- if (dest_link_len == src_link_len
+ if ((size_t) dest_link_len == src_link_len
&& strncmp (dest_link_val, src_link_val, src_link_len) == 0)
same_link = 1;
}