mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
Remove some useless checks
This commit is contained in:
parent
8123e271ec
commit
d31c057b42
6 changed files with 7 additions and 19 deletions
|
|
@ -1043,9 +1043,7 @@ static struct sm_object *init_object(struct impl *impl, const struct object_info
|
|||
pw_proxy_add_object_listener(obj->proxy, &obj->object_listener, info->events, obj);
|
||||
SPA_FLAG_UPDATE(obj->mask, SM_OBJECT_CHANGE_MASK_LISTENER, info->events != NULL);
|
||||
}
|
||||
if (handle) {
|
||||
pw_proxy_add_listener(obj->handle, &obj->handle_listener, &proxy_events, obj);
|
||||
}
|
||||
|
||||
if (info->init)
|
||||
info->init(obj);
|
||||
|
|
|
|||
|
|
@ -214,9 +214,6 @@ static DBusHandlerResult object_handler(DBusConnection *c, DBusMessage *m, void
|
|||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
|
||||
invalid:
|
||||
if (reply)
|
||||
dbus_message_unref(reply);
|
||||
|
||||
if (!(reply = dbus_message_new_error(m,
|
||||
DBUS_ERROR_INVALID_ARGS,
|
||||
"Invalid arguments")))
|
||||
|
|
|
|||
|
|
@ -633,10 +633,7 @@ static int impl_port_set_param(void *object,
|
|||
if (filter->state == PW_FILTER_STATE_ERROR)
|
||||
return -EIO;
|
||||
|
||||
if (port)
|
||||
emit_port_info(impl, port, false);
|
||||
else
|
||||
emit_node_info(impl, false);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ void pw_thread_loop_destroy(struct pw_thread_loop *loop)
|
|||
|
||||
pw_loop_destroy_source(loop->loop, loop->event);
|
||||
|
||||
if (loop->created && loop->loop)
|
||||
if (loop->created)
|
||||
pw_loop_destroy(loop->loop);
|
||||
|
||||
pthread_cond_destroy(&loop->accept_cond);
|
||||
|
|
|
|||
|
|
@ -1777,10 +1777,6 @@ children_of(struct remote_data *rd, uint32_t parent_id,
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
if (!count)
|
||||
return 0;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ static void draw_node(struct global *g)
|
|||
struct global *p;
|
||||
const char *prop_node_id;
|
||||
spa_list_for_each(p, &g->data->globals, link) {
|
||||
if (p == NULL || p->info == NULL)
|
||||
if (p->info == NULL)
|
||||
continue;
|
||||
if (p->type != INTERFACE_Port)
|
||||
continue;
|
||||
|
|
@ -407,7 +407,7 @@ static bool is_node_id_link_referenced(uint32_t id, struct spa_list *globals)
|
|||
struct global *g;
|
||||
struct pw_link_info *info;
|
||||
spa_list_for_each(g, globals, link) {
|
||||
if (g == NULL || g->info == NULL)
|
||||
if (g->info == NULL)
|
||||
continue;
|
||||
if (g->type != INTERFACE_Link)
|
||||
continue;
|
||||
|
|
@ -424,7 +424,7 @@ static bool is_module_id_factory_referenced(uint32_t id, struct spa_list *global
|
|||
struct pw_factory_info *info;
|
||||
const char *module_id_str;
|
||||
spa_list_for_each(g, globals, link) {
|
||||
if (g == NULL || g->info == NULL)
|
||||
if (g->info == NULL)
|
||||
continue;
|
||||
if (g->type != INTERFACE_Factory)
|
||||
continue;
|
||||
|
|
@ -461,7 +461,7 @@ static int draw_graph(struct data *d, const char *path)
|
|||
/* iterate the globals */
|
||||
spa_list_for_each(g, &d->globals, link) {
|
||||
/* skip null and non-info globals */
|
||||
if (g == NULL || g->info == NULL)
|
||||
if (g->info == NULL)
|
||||
continue;
|
||||
|
||||
/* always skip ports since they are drawn by the nodes */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue