spa: replace rindex() with strrchr()

Linux man-page says rindex() got “marked as LEGACY in POSIX.1-2001, [and
removed in] POSIX.1-2008”.
This commit is contained in:
Emmanuel Gil Peyrot 2020-09-07 00:13:03 +02:00 committed by Wim Taymans
parent 0d1b01147f
commit 8332ee0c25

View file

@ -31,6 +31,8 @@ extern "C" {
#include <spa/utils/type-info.h>
#include <string.h>
static inline const struct spa_type_info *spa_debug_type_find(const struct spa_type_info *info, uint32_t type)
{
const struct spa_type_info *res;
@ -53,7 +55,7 @@ static inline const struct spa_type_info *spa_debug_type_find(const struct spa_t
static inline const char *spa_debug_type_short_name(const char *name)
{
const char *h;
if ((h = rindex(name, ':')) != NULL)
if ((h = strrchr(name, ':')) != NULL)
name = h + 1;
return name;
}