mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-25 13:14:14 +08:00
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:
parent
f182cf8618
commit
7fec07d69c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user