[Libreoffice-commits] core.git: extensions/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Mon Oct 14 12:43:08 UTC 2019


 extensions/source/scanner/scanwin.cxx |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 3f1b8f02cac96f92108ad98a2f6b7d34dc4794c6
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Oct 14 10:22:14 2019 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Oct 14 14:42:18 2019 +0200

    Use default initialization instead of memset here
    
    Change-Id: I6f4164e9c7a28e1f9d18fd6fc69dad8c48b53d9a
    Reviewed-on: https://gerrit.libreoffice.org/80754
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx
index 48b2c78bd90e..c8a66b73ade8 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -19,8 +19,6 @@
 
 #include <sal/config.h>
 
-#include <cstring>
-
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/frame/Desktop.hpp>
@@ -265,9 +263,8 @@ void Twain::ShimListenerThread::execute()
             // We need a WinAPI HANDLE of the process to be able to wait on it and detect the process
             // termination; so use WinAPI to start the process, not osl_executeProcess.
 
-            STARTUPINFOW si;
-            std::memset(&si, 0, sizeof si);
-            si.cb = sizeof(STARTUPINFOW);
+            STARTUPINFOW si{};
+            si.cb = sizeof(si);
             PROCESS_INFORMATION pi;
 
             if (!CreateProcessW(nullptr, const_cast<LPWSTR>(o3tl::toW(sCmdLine.getStr())), nullptr,


More information about the Libreoffice-commits mailing list