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:
Peter Hutterer 2021-05-18 11:43:49 +10:00
parent 95a84e797a
commit 522f87d5ea
40 changed files with 83 additions and 79 deletions

View file

@ -242,8 +242,8 @@ static int do_extension_stream_restore_write(struct client *client, uint32_t com
fprintf(f, " ]");
}
if (device_name != NULL && device_name[0] &&
(client->default_source == NULL || strcmp(device_name, client->default_source) != 0) &&
(client->default_sink == NULL || strcmp(device_name, client->default_sink) != 0))
(client->default_source == NULL || !spa_streq(device_name, client->default_source)) &&
(client->default_sink == NULL || !spa_streq(device_name, client->default_sink)))
fprintf(f, ", \"target-node\": \"%s\"", device_name);
fprintf(f, " }");
fclose(f);

View file

@ -350,7 +350,7 @@ static struct object *find_device(struct manager *m, uint32_t card_id, uint32_t
struct pw_node_info *info;
const char *str;
if (strcmp(o->this.type, PW_TYPE_INTERFACE_Node) != 0)
if (!spa_streq(o->this.type, PW_TYPE_INTERFACE_Node))
continue;
if ((info = o->this.info) != NULL &&

View file

@ -3355,7 +3355,7 @@ static int do_set_port_latency_offset(struct client *client, uint32_t command, u
struct port_info *pi = &port_info[i];
size_t j;
if (strcmp(pi->name, port_name) != 0)
if (!spa_streq(pi->name, port_name))
continue;
res = 0;