media-session: remove a superfluous NULL check

spa_streq() checks for NULL and (through the same function) so does
pw_properties_parse_bool()
This commit is contained in:
Peter Hutterer 2021-09-02 16:42:43 +10:00 committed by Wim Taymans
parent f288a2b77d
commit 852d6fc4b6

View file

@ -490,8 +490,7 @@ static void client_info_changed(struct client *client, const struct pw_client_in
} }
is_portal = spa_dict_lookup(props, "pipewire.access.portal.is_portal"); is_portal = spa_dict_lookup(props, "pipewire.access.portal.is_portal");
if (is_portal != NULL && if (spa_streq(is_portal, "yes") || pw_properties_parse_bool(is_portal)) {
(spa_streq(is_portal, "yes") || pw_properties_parse_bool(is_portal))) {
pw_log_info(NAME " %p: client %d is the portal itself", pw_log_info(NAME " %p: client %d is the portal itself",
impl, client->id); impl, client->id);
client->is_portal = true; client->is_portal = true;