From a7cbbd4e4a15094bb8ed0607e7c7e8130a4c99f9 Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Thu, 25 Jul 2019 23:17:17 +0300 Subject: [PATCH] Update BaseDaemon.cpp --- libs/libdaemon/src/BaseDaemon.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/libdaemon/src/BaseDaemon.cpp b/libs/libdaemon/src/BaseDaemon.cpp index 7434e98b77..aa4993acea 100644 --- a/libs/libdaemon/src/BaseDaemon.cpp +++ b/libs/libdaemon/src/BaseDaemon.cpp @@ -509,15 +509,16 @@ namespace /// the maximum is 1000, and chromium uses 300 for its tab processes. Ignore /// whatever errors that occur, because it's just a debugging aid and we don't /// care if it breaks. -#if defined(__linux__) and not defined(NDEBUG) +#if defined(__linux__) && !defined(NDEBUG) void debugIncreaseOOMScore() { const std::string new_score = "555"; - try { + try + { DB::WriteBufferFromFile buf("/proc/self/oom_score_adj"); buf.write(new_score.c_str(), new_score.size()); } - catch (Poco::Exception & e) + catch (const Poco::Exception & e) { LOG_WARNING(&Logger::root(), "Failed to adjust OOM score: '" + e.displayText() + "'."); -- GitLab