Fix type in conditional expression

Function media_endpoint_create returns pointer to structure. In
conditional expression it is safer to compare returned value with NULL
and not with gboolean as it is done in register_endpoint function.
This commit is contained in:
Lukasz Pawlik 2011-06-02 14:54:32 +02:00 committed by Johan Hedberg
parent f182cf8618
commit 7fec07d69c

View File

@ -365,7 +365,7 @@ static DBusMessage *register_endpoint(DBusConnection *conn, DBusMessage *msg,
return btd_error_invalid_args(msg);
if (media_endpoint_create(adapter, sender, path, uuid, delay_reporting,
codec, capabilities, size, &err) == FALSE) {
codec, capabilities, size, &err) == NULL) {
if (err == -EPROTONOSUPPORT)
return btd_error_not_supported(msg);
else