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:36:13 +10:00
parent d8a9534a9a
commit 7697ed0757
130 changed files with 817 additions and 675 deletions

View file

@ -38,6 +38,7 @@
#include <spa/utils/result.h>
#include <spa/utils/names.h>
#include <spa/utils/keys.h>
#include <spa/utils/string.h>
#include <spa/param/audio/format-utils.h>
#include <spa/param/props.h>
#include <spa/debug/dict.h>
@ -707,7 +708,7 @@ static void session_create(void *data, struct sm_object *object)
struct impl *impl = data;
int res;
if (strcmp(object->type, PW_TYPE_INTERFACE_Device) == 0)
if (spa_streq(object->type, PW_TYPE_INTERFACE_Device))
res = handle_device(impl, object);
else
res = 0;
@ -722,7 +723,7 @@ static void session_remove(void *data, struct sm_object *object)
{
struct impl *impl = data;
if (strcmp(object->type, PW_TYPE_INTERFACE_Device) == 0) {
if (spa_streq(object->type, PW_TYPE_INTERFACE_Device)) {
struct device *device;
if ((device = sm_object_get_data(object, SESSION_KEY)) != NULL)
destroy_device(impl, device);