[Libreoffice-commits] online.git: common/Seccomp.cpp wsd/Admin.cpp

Miklos Vajna vmiklos at collabora.co.uk
Tue Oct 24 07:24:48 UTC 2017


 common/Seccomp.cpp |    2 +-
 wsd/Admin.cpp      |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7ab856b196ecc36e65e93bd376c2201d00f532b7
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Oct 24 09:23:54 2017 +0200

    common, wsd: clean up redundant casts
    
    Change-Id: Iad7e2417c6b1a154f6ad21839b841ca452e835c5

diff --git a/common/Seccomp.cpp b/common/Seccomp.cpp
index 42922b55..09a53cdc 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<ucontext_t *>(context);
+	ucontext_t *uctx = static_cast<ucontext_t *>(context);
 
     Log::signalLogPrefix();
     Log::signalLog("SIGSYS trapped with code: ");
diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp
index 6b520684..19da7e4c 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<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)
     {


More information about the Libreoffice-commits mailing list