mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -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
|
|
@ -30,6 +30,7 @@
|
|||
#include <spa/support/log.h>
|
||||
#include <spa/utils/list.h>
|
||||
#include <spa/utils/names.h>
|
||||
#include <spa/utils/string.h>
|
||||
#include <spa/node/node.h>
|
||||
#include <spa/node/io.h>
|
||||
#include <spa/node/utils.h>
|
||||
|
|
@ -947,7 +948,7 @@ static int impl_get_interface(struct spa_handle *handle, const char *type, void
|
|||
|
||||
this = (struct impl *) handle;
|
||||
|
||||
if (strcmp(type, SPA_TYPE_INTERFACE_Node) == 0)
|
||||
if (spa_streq(type, SPA_TYPE_INTERFACE_Node))
|
||||
*interface = &this->node;
|
||||
else
|
||||
return -ENOENT;
|
||||
|
|
@ -1006,11 +1007,11 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
if ((str = spa_dict_lookup(info, "resample.quality")) != NULL)
|
||||
this->props.quality = atoi(str);
|
||||
if ((str = spa_dict_lookup(info, "resample.peaks")) != NULL)
|
||||
this->peaks = strcmp(str, "true") == 0 || atoi(str) == 1;
|
||||
this->peaks = spa_streq(str, "true") || atoi(str) == 1;
|
||||
if ((str = spa_dict_lookup(info, "factory.mode")) != NULL) {
|
||||
if (strcmp(str, "split") == 0)
|
||||
if (spa_streq(str, "split"))
|
||||
this->mode = MODE_SPLIT;
|
||||
else if (strcmp(str, "merge") == 0)
|
||||
else if (spa_streq(str, "merge"))
|
||||
this->mode = MODE_MERGE;
|
||||
else
|
||||
this->mode = MODE_CONVERT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue