diff options
author | Timo Weingärtner <timo@tiwe.de> | 2011-12-02 19:07:31 +0100 |
---|---|---|
committer | Timo Weingärtner <timo@tiwe.de> | 2011-12-02 19:07:31 +0100 |
commit | 1c803dcad160e85fe4b8d46b322374283c0edd89 (patch) | |
tree | 36e32f32ab64ded6a1038238cecc64b5fbd51c65 /hadori.C | |
parent | 568bd7e0d719d7754943c6cfebfa4e4179d62333 (diff) | |
download | hadori-1c803dcad160e85fe4b8d46b322374283c0edd89.tar.gz |
move kept, to_link, sizes as static into handle_file
only used inside that function
Diffstat (limited to 'hadori.C')
-rw-r--r-- | hadori.C | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -18,9 +18,6 @@ namespace po = boost::program_options; #include "inode.h" -std::map<ino_t, inode const> kept; -std::map<ino_t, ino_t> to_link; -std::multimap<off_t, ino_t> 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<ino_t, inode const> kept; + static std::map<ino_t, ino_t> to_link; + static std::multimap<off_t, ino_t> 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; |