From 51d5f8a438a41284ad24bacc2c0df25ed8f8bb88 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 28 Dec 2000 09:42:06 +0000 Subject: (same_file_ok): Use a single auto var for tmp_dst_sb, instead of two static vars. Likewise for tmp_src_sb. --- src/copy.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/copy.c b/src/copy.c index bd8a224f3..4a809dd0e 100644 --- a/src/copy.c +++ b/src/copy.c @@ -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)) -- cgit v1.2.3-70-g09d2