mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
treewide: replace strcmp() == 0 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
d8a9534a9a
commit
7697ed0757
130 changed files with 817 additions and 675 deletions
|
|
@ -32,6 +32,7 @@
|
|||
#include <spa/utils/keys.h>
|
||||
#include <spa/utils/names.h>
|
||||
#include <spa/utils/list.h>
|
||||
#include <spa/utils/string.h>
|
||||
#include <spa/monitor/device.h>
|
||||
#include <spa/param/audio/format.h>
|
||||
#include <spa/pod/filter.h>
|
||||
|
|
@ -716,7 +717,7 @@ static int impl_get_interface(struct spa_handle *handle, const char *type, void
|
|||
|
||||
this = (struct state *) handle;
|
||||
|
||||
if (strcmp(type, SPA_TYPE_INTERFACE_Node) == 0)
|
||||
if (spa_streq(type, SPA_TYPE_INTERFACE_Node))
|
||||
*interface = &this->node;
|
||||
else
|
||||
return -ENOENT;
|
||||
|
|
@ -825,11 +826,11 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
} else if (!strcmp(k, "api.alsa.headroom")) {
|
||||
this->default_headroom = atoi(s);
|
||||
} else if (!strcmp(k, "api.alsa.disable-mmap")) {
|
||||
this->disable_mmap = (strcmp(s, "true") == 0 || atoi(s) == 1);
|
||||
this->disable_mmap = (spa_streq(s, "true") || atoi(s) == 1);
|
||||
} else if (!strcmp(k, "api.alsa.disable-batch")) {
|
||||
this->disable_batch = (strcmp(s, "true") == 0 || atoi(s) == 1);
|
||||
this->disable_batch = (spa_streq(s, "true") || atoi(s) == 1);
|
||||
} else if (!strcmp(k, "api.alsa.use-chmap")) {
|
||||
this->props.use_chmap = (strcmp(s, "true") == 0 || atoi(s) == 1);
|
||||
this->props.use_chmap = (spa_streq(s, "true") || atoi(s) == 1);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue