From 549f325c219dfde542fa214b7ecf0b2a96a8aa98 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Mon, 16 Mar 2020 10:22:54 +0100 Subject: [PATCH] rsync(): Fix variable shadowing, found by clang-tidy Signed-off-by: Joachim Nilsson --- src/rsync.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rsync.c b/src/rsync.c index 3741d56..af802a2 100644 --- a/src/rsync.c +++ b/src/rsync.c @@ -107,20 +107,20 @@ int rsync(char *src, char *dst, int opt, int (*filter)(const char *file)) snprintf(source, sizeof(source), "%s%s%s", src, fisslashdir(src) ? "" : "/", files[i]); if (fisdir(source)) { char dst2[256]; - struct stat st; + struct stat sb; strcat(source, "/"); - if (stat(source, &st)) + if (stat(source, &sb)) return 1; - if (mdir(dst2, sizeof(dst2), dst, files[i], &st)) { + if (mdir(dst2, sizeof(dst2), dst, files[i], &sb)) { result++; continue; } rsync(source, dst2, opt, filter); if (keep_mtim) - set_mtime(dst2, &st); + set_mtime(dst2, &sb); continue; /* Next file/dir in @src to copy... */ }