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

@ -592,7 +592,7 @@ static int find_route(struct device *dev, uint32_t device_id, const char *name,
if (p->id != SPA_PARAM_EnumRoute ||
parse_enum_route(p, device_id, r) < 0)
continue;
if (strcmp(r->name, name) != 0)
if (!spa_streq(r->name, name))
continue;
return 0;
}
@ -821,7 +821,7 @@ static void session_create(void *data, struct sm_object *object)
struct device *dev;
const char *name;
if (strcmp(object->type, PW_TYPE_INTERFACE_Device) != 0 ||
if (!spa_streq(object->type, PW_TYPE_INTERFACE_Device) ||
object->props == NULL ||
(name = pw_properties_get(object->props, PW_KEY_DEVICE_NAME)) == NULL)
return;
@ -854,7 +854,7 @@ static void session_remove(void *data, struct sm_object *object)
struct impl *impl = data;
struct device *dev;
if (strcmp(object->type, PW_TYPE_INTERFACE_Device) != 0)
if (!spa_streq(object->type, PW_TYPE_INTERFACE_Device))
return;
pw_log_debug(NAME " %p: remove device '%d'", impl, object->id);