From 1c803dcad160e85fe4b8d46b322374283c0edd89 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Fri, 2 Dec 2011 19:07:31 +0100 Subject: move kept, to_link, sizes as static into handle_file only used inside that function --- hadori.C | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hadori.C b/hadori.C index 093f9a3..3564c04 100644 --- a/hadori.C +++ b/hadori.C @@ -18,9 +18,6 @@ namespace po = boost::program_options; #include "inode.h" -std::map kept; -std::map to_link; -std::multimap sizes; po::variables_map config; std::ostream debug(std::clog.rdbuf()), verbose(std::clog.rdbuf()), error(std::clog.rdbuf()); @@ -47,6 +44,10 @@ void do_link (inode const & i, std::string const & other) { } void handle_file(std::string const & path, struct stat const & s) { + static std::map kept; + static std::map to_link; + static std::multimap sizes; + debug << "examining " << path << std::endl; if (kept.count(s.st_ino)) { debug << "another link to inode " << s.st_ino << " that we keep" << std::endl; -- cgit v1.2.3