mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-24 07:00:05 -05:00
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:
parent
d8a9534a9a
commit
7697ed0757
130 changed files with 817 additions and 675 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#include <assert.h>
|
||||
|
||||
#include <spa/utils/dict.h>
|
||||
#include <spa/utils/string.h>
|
||||
|
||||
#define MAX_COUNT 100000
|
||||
#define MAX_ITEMS 1000
|
||||
|
|
@ -74,7 +75,7 @@ static void test_query(const struct spa_dict *dict)
|
|||
for (i = 0; i < MAX_COUNT; i++) {
|
||||
idx = random() % dict->n_items;
|
||||
str = spa_dict_lookup(dict, dict->items[idx].key);
|
||||
assert(strcmp(str, dict->items[idx].value) == 0);
|
||||
assert(spa_streq(str, dict->items[idx].value));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue