]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(same_file_ok): Use a single auto var for
authorJim Meyering <jim@meyering.net>
Thu, 28 Dec 2000 09:42:06 +0000 (09:42 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 28 Dec 2000 09:42:06 +0000 (09:42 +0000)
tmp_dst_sb, instead of two static vars.
Likewise for tmp_src_sb.

src/copy.c

index bd8a224f33025ec88ab6e4bff35bd6dc2188cb8a..4a809dd0ef0db3b4dff38ebac886bf16d815cf07 100644 (file)
@@ -392,6 +392,8 @@ same_file_ok (const char *src_path, const struct stat *src_sb,
 {
   const struct stat *src_sb_link;
   const struct stat *dst_sb_link;
+  struct stat tmp_dst_sb;
+  struct stat tmp_src_sb;
 
   int same_link;
   int same = (SAME_INODE (*src_sb, *dst_sb));
@@ -424,8 +426,6 @@ same_file_ok (const char *src_path, const struct stat *src_sb,
     }
   else
     {
-      static struct stat tmp_dst_sb;
-      static struct stat tmp_src_sb;
       if (!same)
        return 1;
 
@@ -512,8 +512,6 @@ same_file_ok (const char *src_path, const struct stat *src_sb,
 
   if (x->xstat == lstat)
     {
-      static struct stat tmp_dst_sb;
-      static struct stat tmp_src_sb;
       if (stat (dst_path, &tmp_dst_sb)
          || stat (src_path, &tmp_src_sb)
          || ! SAME_INODE (tmp_dst_sb, tmp_dst_sb))