common, wsd: clean up redundant casts

Change-Id: Iad7e2417c6b1a154f6ad21839b841ca452e835c5
This commit is contained in:
Miklos Vajna
2017-10-24 09:23:54 +02:00
parent 7bc510c17a
commit 7ab856b196
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ static void handleSysSignal(int /* signal */,
siginfo_t *info,
void *context)
{
ucontext_t *uctx = reinterpret_cast<ucontext_t *>(context);
ucontext_t *uctx = static_cast<ucontext_t *>(context);
Log::signalLogPrefix();
Log::signalLog("SIGSYS trapped with code: ");

View File

@ -342,7 +342,7 @@ Admin::Admin() :
_totalSysMem = Util::getTotalSystemMemory();
LOG_TRC("Total system memory : " << _totalSysMem);
const auto memLimit = LOOLWSD::getConfigValue<double>("memproportion", static_cast<double>(0.0));
const auto memLimit = LOOLWSD::getConfigValue<double>("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<double>("memproportion", static_cast<double>(0.0));
const auto memLimit = LOOLWSD::getConfigValue<double>("memproportion", 0.0);
LOG_TRC("Mem proportion for LOOL configured : " << memLimit);
if (memLimit == 0.0 || _totalSysMem == 0)
{