From 7ab856b196ecc36e65e93bd376c2201d00f532b7 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 24 Oct 2017 09:23:54 +0200 Subject: [PATCH] common, wsd: clean up redundant casts Change-Id: Iad7e2417c6b1a154f6ad21839b841ca452e835c5 --- common/Seccomp.cpp | 2 +- wsd/Admin.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/Seccomp.cpp b/common/Seccomp.cpp index 42922b554f..09a53cdca8 100644 --- a/common/Seccomp.cpp +++ b/common/Seccomp.cpp @@ -50,7 +50,7 @@ static void handleSysSignal(int /* signal */, siginfo_t *info, void *context) { - ucontext_t *uctx = reinterpret_cast(context); + ucontext_t *uctx = static_cast(context); Log::signalLogPrefix(); Log::signalLog("SIGSYS trapped with code: "); diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp index 6b520684fd..19da7e4c19 100644 --- a/wsd/Admin.cpp +++ b/wsd/Admin.cpp @@ -342,7 +342,7 @@ Admin::Admin() : _totalSysMem = Util::getTotalSystemMemory(); LOG_TRC("Total system memory : " << _totalSysMem); - const auto memLimit = LOOLWSD::getConfigValue("memproportion", static_cast(0.0)); + const auto memLimit = LOOLWSD::getConfigValue("memproportion", 0.0); _totalAvailMem = _totalSysMem; if (memLimit != 0.0) _totalAvailMem = _totalSysMem * memLimit/100.; @@ -554,7 +554,7 @@ void Admin::triggerMemoryCleanup(size_t totalMem) { LOG_TRC("Total memory we are consuming (in kB): " << totalMem); // Trigger mem cleanup when we are consuming too much memory (as configured by sysadmin) - const auto memLimit = LOOLWSD::getConfigValue("memproportion", static_cast(0.0)); + const auto memLimit = LOOLWSD::getConfigValue("memproportion", 0.0); LOG_TRC("Mem proportion for LOOL configured : " << memLimit); if (memLimit == 0.0 || _totalSysMem == 0) {