mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-11 13:30:07 -05:00
tree-wide: replace strstr(a, b) == a with spa_strstartswith()
spa_strstartswith() is more immediately understandable. Coccinelle spatch file: @@ expression E1, E2; @@ - strstr(E1, E2) != E1 + !spa_strstartswith(E1, E2) @@ expression E1, E2; @@ - strstr(E1, E2) == E1 + spa_strstartswith(E1, E2) Applied to the tree except for alsa/acp/compat.h because it looks like that header is still mostly as-is from PA.
This commit is contained in:
parent
60c510d766
commit
51a177eb6d
20 changed files with 48 additions and 48 deletions
|
|
@ -405,7 +405,7 @@ static int update_device_props(struct device *device)
|
|||
snprintf(temp, sizeof(temp), "%d", device->id);
|
||||
s = temp;
|
||||
}
|
||||
if (strstr(s, "bluez_card.") == s)
|
||||
if (spa_strstartswith(s, "bluez_card."))
|
||||
s += strlen("bluez_card.");
|
||||
|
||||
pw_properties_set(p, PW_KEY_DEVICE_NAME,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue