summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-21 15:04:57 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-22 12:43:56 +0200
commit78490b45c771a4c9632b324922f2c8e83f06153b (patch)
tree0e74de3a28bce5a7300f39aa36378d35eedc0afe /sd
parent5c147fc5fe0e77838b8e9bebd4ff215a80946980 (diff)
pvs-studio: V668 no sense testing against null as memory was allocated by new
category V668 complete Change-Id: I986d4cb89a7c72d54d71ea01fc598a9958deee24 Reviewed-on: https://gerrit.libreoffice.org/62138 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/remotecontrol/DiscoveryService.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index 0d999af5069a..389589be854d 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -80,6 +80,7 @@ void DiscoveryService::setupSockets()
#ifdef MACOSX
// Bonjour for OSX
zService = new OSXNetworkService();
+ zService->setup();
#endif
#if HAVE_FEATURE_AVAHI
@@ -89,15 +90,14 @@ void DiscoveryService::setupSockets()
gethostname(hostname, 1023);
zService = new AvahiNetworkService(hostname);
+ zService->setup();
#endif
#ifdef _WIN32
zService = new WINNetworkService();
+ zService->setup();
#endif
- if (zService)
- zService->setup();
-
// Old implementation for backward compatibility matter
mSocket = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
if (mSocket == -1)