Fix clang warning about bool to pointer conversion.

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.

Change-Id: Ia09758e8d28599097f5c40eb24722890508afdbc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Jędrzej Nowacki 2011-11-17 14:42:48 +01:00 committed by Qt by Nokia
parent 8b12b566db
commit 50995e6936
2 changed files with 2 additions and 2 deletions

View File

@ -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())

View File

@ -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)