mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-12 13:30:15 -05:00
type: improve type check
This commit is contained in:
parent
0855ca0050
commit
53dd63eb3a
2 changed files with 6 additions and 6 deletions
|
|
@ -45,7 +45,7 @@ typedef uint32_t SpaType;
|
|||
static inline bool
|
||||
spa_type_is_a (const char *type, const char *parent)
|
||||
{
|
||||
return type != NULL && parent != NULL && strstr (type, parent) == type;
|
||||
return type != NULL && parent != NULL && strncmp (type, parent, strlen (parent)) == 0;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue