From 5f05aea3182a80a625c3ce15380136e682497be2 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 19 Sep 2007 23:09:41 +0200 Subject: [PATCH] osl.c for_each_file_in_dir(): Move struct stat to inner loop. --- osl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osl.c b/osl.c index b1aaf3e5..7f6ffdb9 100644 --- a/osl.c +++ b/osl.c @@ -267,7 +267,6 @@ int for_each_file_in_dir(const char *dirname, * and calling chdir() afterwards (see man 3 getcwd). */ int cwd_fd = open(".", O_RDONLY); - struct stat s; int ret = -1; // PARA_DEBUG_LOG("dirname: %s\n", dirname); @@ -284,6 +283,7 @@ int for_each_file_in_dir(const char *dirname, while ((entry = readdir(dir))) { mode_t m; char *tmp; + struct stat s; if (!strcmp(entry->d_name, ".")) continue; -- 2.39.2