mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
treewide: replace !strcmp() with spa_streq()
This change is only done in source files for now, header files will be done separately.
This commit is contained in:
parent
7697ed0757
commit
95a84e797a
28 changed files with 239 additions and 221 deletions
|
|
@ -304,7 +304,7 @@ static struct node *alsa_create_node(struct device *device, uint32_t id,
|
|||
profile = "unknown";
|
||||
profile_desc = pw_properties_get(node->props, "device.profile.description");
|
||||
|
||||
if (!strcmp(stream, "capture"))
|
||||
if (spa_streq(stream, "capture"))
|
||||
node->direction = PW_DIRECTION_OUTPUT;
|
||||
else
|
||||
node->direction = PW_DIRECTION_INPUT;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
#include "pipewire/pipewire.h"
|
||||
#include "pipewire/array.h"
|
||||
|
||||
#include <spa/utils/string.h>
|
||||
|
||||
#include <extensions/metadata.h>
|
||||
|
||||
#include "media-session.h"
|
||||
|
|
@ -139,7 +141,7 @@ static struct item *find_item(struct metadata *this, uint32_t subject, const cha
|
|||
struct item *item;
|
||||
|
||||
pw_array_for_each(item, &this->metadata) {
|
||||
if (item->subject == subject && (key == NULL || !strcmp(item->key, key)))
|
||||
if (item->subject == subject && (key == NULL || spa_streq(item->key, key)))
|
||||
return item;
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ handle_node(struct impl *impl, struct sm_object *object)
|
|||
spa_list_append(&impl->node_list, &node->link);
|
||||
impl->node_list_changed = true;
|
||||
|
||||
if (role && !strcmp(role, "DSP"))
|
||||
if (role && spa_streq(role, "DSP"))
|
||||
node->active = node->configured = true;
|
||||
|
||||
if (strstr(media_class, "Stream/") == media_class) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue