summaryrefslogtreecommitdiff
path: root/extensions/source/update
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-10-14 16:55:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-16 14:19:16 +0000
commitd11ac6045926d4c6e392b3797939fbb7c7d37b27 (patch)
treeb6b99803b11f8f9d84bba39ee2d38430c4f59c69 /extensions/source/update
parent099ef29c47970d4b9d20f31d0ccbef93c492226b (diff)
clang-cl loplugin: extensions
Change-Id: I659d8a3b098c7417235006c86ea60e7fe1e56a44 Reviewed-on: https://gerrit.libreoffice.org/29867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'extensions/source/update')
-rw-r--r--extensions/source/update/check/onlinecheck.cxx4
-rw-r--r--extensions/source/update/check/onlinecheck.hxx33
-rw-r--r--extensions/source/update/check/updatecheck.cxx7
3 files changed, 38 insertions, 6 deletions
diff --git a/extensions/source/update/check/onlinecheck.cxx b/extensions/source/update/check/onlinecheck.cxx
index 9324ff7699b5..3207647447f0 100644
--- a/extensions/source/update/check/onlinecheck.cxx
+++ b/extensions/source/update/check/onlinecheck.cxx
@@ -24,6 +24,8 @@
#include <sal/types.h>
#include <sal/macros.h>
+#include <onlinecheck.hxx>
+
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <wininet.h>
@@ -48,7 +50,7 @@ extern "C" bool SAL_CALL WNT_hasInternetConnection()
SAL_N_ELEMENTS(szConnectionName),
0 );
- return fIsConnected ? true : false;
+ return fIsConnected;
#ifndef __MINGW32__
} __except( EXCEPTION_EXECUTE_HANDLER ) {
diff --git a/extensions/source/update/check/onlinecheck.hxx b/extensions/source/update/check/onlinecheck.hxx
new file mode 100644
index 000000000000..731d3e6c2cbb
--- /dev/null
+++ b/extensions/source/update/check/onlinecheck.hxx
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_EXTENSIONS_SOURCE_UPDATE_CHECK_ONLINECHECK_HXX
+#define INCLUDED_EXTENSIONS_SOURCE_UPDATE_CHECK_ONLINECHECK_HXX
+
+#include <sal/config.h>
+
+#include <sal/types.h>
+
+#if defined(_WIN32)
+extern "C" bool SAL_CALL WNT_hasInternetConnection();
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 7bee406f8b2d..437af2a3d541 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -53,6 +53,7 @@
#endif
#endif
+#include <onlinecheck.hxx>
#include "updateprotocol.hxx"
#include "updatecheckconfig.hxx"
@@ -70,10 +71,6 @@ namespace uno = com::sun::star::uno ;
#define PROPERTY_CLICK_HDL "MenuClickHDL"
#define PROPERTY_SHOW_MENUICON "MenuIconVisible"
-#if defined(_WIN32)
-extern "C" bool SAL_CALL WNT_hasInternetConnection();
-#endif
-
// Returns the URL of the release note for the given position
OUString getReleaseNote(const UpdateInfo& rInfo, sal_uInt8 pos, bool autoDownloadEnabled)
{
@@ -606,7 +603,7 @@ DownloadThread::run()
#ifdef _WIN32
CoUninitialize();
- CoInitialize( NULL );
+ CoInitialize( nullptr );
#endif
while( schedule() )