From e913eebe7c8331a271d5d9db70fcd47da76e4287 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 30 May 2002 07:49:56 +0000 Subject: (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. --- src/copy.c | 5 +++-- 1 file 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; } -- cgit v1.2.3-70-g09d2