aboutsummaryrefslogtreecommitdiff
path: root/src/nix-collect-garbage/nix-collect-garbage.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-07-30 13:10:49 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-07-30 13:34:04 +0200
commit3f6e88a5527dcc4d58e3147f78388a88eb8896e0 (patch)
treed1677cf561e302868235ea87e89741a050b0d543 /src/nix-collect-garbage/nix-collect-garbage.cc
parentebee2b7852a8c0441e9470a0df8ec3c71d322109 (diff)
unsigned long long -> uint64_t
Diffstat (limited to 'src/nix-collect-garbage/nix-collect-garbage.cc')
-rw-r--r--src/nix-collect-garbage/nix-collect-garbage.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nix-collect-garbage/nix-collect-garbage.cc b/src/nix-collect-garbage/nix-collect-garbage.cc
index aa5ada3a6..bcf1d8518 100644
--- a/src/nix-collect-garbage/nix-collect-garbage.cc
+++ b/src/nix-collect-garbage/nix-collect-garbage.cc
@@ -67,10 +67,8 @@ static int _main(int argc, char * * argv)
deleteOlderThan = getArg(*arg, arg, end);
}
else if (*arg == "--dry-run") dryRun = true;
- else if (*arg == "--max-freed") {
- long long maxFreed = getIntArg<long long>(*arg, arg, end, true);
- options.maxFreed = maxFreed >= 0 ? maxFreed : 0;
- }
+ else if (*arg == "--max-freed")
+ options.maxFreed = std::max(getIntArg<int64_t>(*arg, arg, end, true), (int64_t) 0);
else
return false;
return true;