avoid some useless assignments

This commit is contained in:
Wim Taymans 2020-05-20 13:52:10 +02:00
parent 4f60dcadc6
commit eb93f259e0
7 changed files with 10 additions and 13 deletions

View file

@ -296,7 +296,7 @@ static void dbus_device_object_info(void *data, uint32_t id,
return;
remove_object(impl, obj);
} else if (obj == NULL) {
if ((obj = create_object(impl, id, info)) == NULL)
if (create_object(impl, id, info) == NULL)
return;
} else {
update_object(impl, obj, info);

View file

@ -411,7 +411,7 @@ static void bluez5_enum_object_info(void *data, uint32_t id,
return;
bluez5_remove_device(impl, device);
} else if (device == NULL) {
if ((device = bluez5_create_device(impl, id, info)) == NULL)
if (bluez5_create_device(impl, id, info) == NULL)
return;
} else {
bluez5_update_device(impl, device, info);

View file

@ -425,7 +425,7 @@ static void v4l2_udev_object_info(void *data, uint32_t id,
return;
v4l2_remove_device(impl, dev);
} else if (dev == NULL) {
if ((dev = v4l2_create_device(impl, id, info)) == NULL)
if (v4l2_create_device(impl, id, info) == NULL)
return;
} else {
v4l2_update_device(impl, dev, info);