type: improve type check

This commit is contained in:
Wim Taymans 2017-05-17 12:47:33 +02:00
parent 0855ca0050
commit 53dd63eb3a
2 changed files with 6 additions and 6 deletions

View file

@ -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