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

@ -196,7 +196,7 @@ static int client_endpoint_create_link(void *object, const struct spa_dict *prop
goto exit;
}
obj = sm_media_session_find_object(impl->session, atoi(str));
if (obj == NULL || strcmp(obj->type, PW_TYPE_INTERFACE_Endpoint) !=0) {
if (obj == NULL || !spa_streq(obj->type, PW_TYPE_INTERFACE_Endpoint)) {
pw_log_warn(NAME" %p: could not find endpoint %s (%p)", impl, str, obj);
res = -EINVAL;
goto exit;
@ -681,7 +681,7 @@ handle_device(struct impl *impl, struct sm_object *obj)
if (strstr(media_class, "Audio/") != media_class)
return 0;
if (strcmp(str, "alsa") != 0)
if (!spa_streq(str, "alsa"))
return 0;
device = sm_object_add_data(obj, SESSION_KEY, sizeof(struct device));