treewide: replace !strcmp() 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:40:50 +10:00
parent 7697ed0757
commit 95a84e797a
28 changed files with 239 additions and 221 deletions

View file

@ -829,11 +829,11 @@ impl_init(const struct spa_handle_factory *factory,
for (i = 0; info && i < info->n_items; i++) {
const char *k = info->items[i].key;
const char *s = info->items[i].value;
if (!strcmp(k, SPA_KEY_AUDIO_CHANNELS)) {
if (spa_streq(k, SPA_KEY_AUDIO_CHANNELS)) {
this->props.channels = atoi(s);
} else if (!strcmp(k, SPA_KEY_AUDIO_RATE)) {
} else if (spa_streq(k, SPA_KEY_AUDIO_RATE)) {
this->props.rate = atoi(s);
} else if (!strcmp(k, SPA_KEY_AUDIO_POSITION)) {
} else if (spa_streq(k, SPA_KEY_AUDIO_POSITION)) {
parse_position(this, s, strlen(s));
}
}