From 002f59e53a0968a49e9528d9c30b9f1ac575e95f Mon Sep 17 00:00:00 2001 From: Michael Insel Date: Thu, 4 Oct 2018 11:06:27 +0200 Subject: [PATCH] Fix check_memory thresholds in 'used' mode The thresholds in the used mode now breaks if the value is bigger than the threshold. --- plugins/check_memory.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/check_memory.cpp b/plugins/check_memory.cpp index e69e02700..2d723b487 100644 --- a/plugins/check_memory.cpp +++ b/plugins/check_memory.cpp @@ -150,7 +150,11 @@ static int parseArguments(int ac, WCHAR ** av, po::variables_map& vm, printInfoS } } - printInfo.showUsed = vm.count("show-used") > 0; + if (vm.count("show-used")) { + printInfo.showUsed = true; + printInfo.warn.legal = true; + printInfo.crit.legal = true; + } return -1; } -- 2.40.0