aboutsummaryrefslogtreecommitdiff
path: root/src/resolve-system-dependencies/resolve-system-dependencies.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve-system-dependencies/resolve-system-dependencies.cc')
-rw-r--r--src/resolve-system-dependencies/resolve-system-dependencies.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/resolve-system-dependencies/resolve-system-dependencies.cc b/src/resolve-system-dependencies/resolve-system-dependencies.cc
index e02cfc03e..45e8b6796 100644
--- a/src/resolve-system-dependencies/resolve-system-dependencies.cc
+++ b/src/resolve-system-dependencies/resolve-system-dependencies.cc
@@ -117,9 +117,7 @@ Path resolveSymlink(const Path & path)
std::set<string> resolveTree(const Path & path, PathSet & deps)
{
std::set<string> results;
- if (deps.count(path))
- return {};
- deps.insert(path);
+ if (!deps.insert(path).second) return {};
for (auto & lib : runResolver(path)) {
results.insert(lib);
for (auto & p : resolveTree(lib, deps)) {