treewide: replace plain strcmp() calls with spa_streq

This commit is contained in:
Peter Hutterer 2021-05-18 13:49:02 +10:00
parent 522f87d5ea
commit 92514d57e4
7 changed files with 17 additions and 13 deletions

View file

@ -395,11 +395,11 @@ static struct node *alsa_create_node(struct device *device, uint32_t id,
pw_properties_set(node->props, PW_KEY_NODE_DESCRIPTION,
sm_media_session_sanitize_description(tmp, sizeof(tmp),
' ', "%s %s", desc, profile_desc));
} else if (strcmp(subdev, "0")) {
} else if (!spa_streq(subdev, "0")) {
pw_properties_set(node->props, PW_KEY_NODE_DESCRIPTION,
sm_media_session_sanitize_description(tmp, sizeof(tmp),
' ', "%s (%s %s)", desc, name, subdev));
} else if (strcmp(dev, "0")) {
} else if (!spa_streq(dev, "0")) {
pw_properties_set(node->props, PW_KEY_NODE_DESCRIPTION,
sm_media_session_sanitize_description(tmp, sizeof(tmp),
' ', "%s (%s)", desc, name));

View file

@ -1968,7 +1968,7 @@ children_of(struct remote_data *rd, uint32_t parent_id,
global = item->data;
if (strcmp(global->type, child_type))
if (!spa_streq(global->type, child_type))
continue;
pd = pw_proxy_get_user_data(global->proxy);
@ -1983,7 +1983,7 @@ children_of(struct remote_data *rd, uint32_t parent_id,
}
/* match? */
if (strcmp(parent_value, child_value))
if (!spa_streq(parent_value, child_value))
continue;
if (*children)