Commit 1d0b9d48 authored by Moritz Grimm's avatar Moritz Grimm
Browse files

Simplify util_strrcmp to return a strictly boolean value

parent f5f130e0
......@@ -200,9 +200,9 @@ util_strrcmp(const char *s, const char *sub)
size_t sublen = strlen(sub);
if (sublen > slen)
return (1);
return (!0);
return (memcmp(s + slen - sublen, sub, sublen));
return (!!memcmp(s + slen - sublen, sub, sublen));
}
int
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment