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:
parent
8b12b566db
commit
50995e6936
@ -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())
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user