1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-12-04 14:46:31 -05:00

Simplify util_strrcmp to return a strictly boolean value

This commit is contained in:
Moritz Grimm 2017-09-25 17:07:40 +02:00
parent f5f130e036
commit 1d0b9d4801

View File

@ -200,9 +200,9 @@ util_strrcmp(const char *s, const char *sub)
size_t sublen = strlen(sub); size_t sublen = strlen(sub);
if (sublen > slen) if (sublen > slen)
return (1); return (!0);
return (memcmp(s + slen - sublen, sub, sublen)); return (!!memcmp(s + slen - sublen, sub, sublen));
} }
int int