module: Replace rindex() with strrchr()

rindex() appears to be "non-standard" to an extent, and it caused a
build failure on mingw32.

From the man page of rindex(): "POSIX.1-2008 removes the
specifications of index() and rindex(), recommending strchr(3) and
strrchr(3) instead."
This commit is contained in:
Tanu Kaskinen 2014-01-27 21:00:58 +02:00
parent 588af08d25
commit eab0544f23

View file

@ -67,7 +67,7 @@ bool pa_module_exists(const char *name) {
/* strip .so from the end of name, if present */
n = pa_xstrdup(name);
p = rindex(n, '.');
p = strrchr(n, '.');
if (p && pa_streq(p, PA_SOEXT))
p[0] = 0;