From af268af523c3d72fc1b0b573dea6f29e2b3119f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Thu, 17 Nov 2011 14:42:48 +0100 Subject: Fix clang warning about bool to pointer conversion. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The operation is legal from C++ perspective but only for "false" as it is guaranteed to be 0. Anyway returning 0 instead of "false" is logical and it follows coding style used in the modified functions. (cherry-picked from qt5 commit 50995e6936c5ca75a0a8a48c29bbbedd2cc60567) Change-Id: Ia09758e8d28599097f5c40eb24722890508afdbc Reviewed-by: Thiago Macieira Reviewed-by: Jędrzej Nowacki --- src/dbus/qdbusconnection.cpp | 2 +- src/dbus/qdbusutil.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp index 5c133e3..bb03c00 100644 --- a/src/dbus/qdbusconnection.cpp +++ b/src/dbus/qdbusconnection.cpp @@ -937,7 +937,7 @@ QObject *QDBusConnection::objectRegisteredAt(const QString &path) const Q_ASSERT_X(QDBusUtil::isValidObjectPath(path), "QDBusConnection::registeredObject", "Invalid object path given"); if (!d || !d->connection || !QDBusUtil::isValidObjectPath(path)) - return false; + return 0; QStringList pathComponents = path.split(QLatin1Char('/')); if (pathComponents.last().isEmpty()) diff --git a/src/dbus/qdbusutil.cpp b/src/dbus/qdbusutil.cpp index 0ad02ae..4e883c3 100644 --- a/src/dbus/qdbusutil.cpp +++ b/src/dbus/qdbusutil.cpp @@ -259,7 +259,7 @@ static const char *validateSingleType(const char *signature) { register char c = *signature; if (c == DBUS_TYPE_INVALID) - return false; + return 0; // is it one of the one-letter types? if (strchr(oneLetterTypes, c) != NULL) -- cgit v0.12