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

Stephan Bergmann sbergman at redhat.com
Fri Jun 30 09:07:23 UTC 2017


 desktop/source/app/officeipcthread.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c724093edb92c53db8cbb8ab5b910610a9fb53d0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jun 30 11:06:58 2017 +0200

    loplugin:oncevar
    
    Change-Id: I070f06ed3195925e525066c6ba25a0bb01b824d0

diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 57546f8ea66d..e32c32d82498 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -755,11 +755,11 @@ RequestHandler::Status RequestHandler::Enable(bool ipc)
     }
 
     enum class Kind { Pipe, Dbus };
-    Kind kind = Kind::Pipe;
+    Kind kind;
 #if ENABLE_DBUS
-    if (std::getenv("LIBO_FLATPAK") != nullptr) {
-        kind = Kind::Dbus;
-    }
+    kind = std::getenv("LIBO_FLATPAK") != nullptr ? Kind::Dbus : Kind::Pipe;
+#else
+    kind = Kind::Pipe;
 #endif
     rtl::Reference<IpcThread> thread;
     Status stat = Status(); // silence bogus potentially-uninitialized warnings


More information about the Libreoffice-commits mailing list