summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>2014-01-27 21:00:58 +0200
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>2014-01-27 21:00:58 +0200
commiteab0544f230ae4d89d139a9a7af1a7281c40689a (patch)
tree9c3e0d090cd9b93937950038652dcb9ee91f34a2
parent588af08d254b9b02b9a2caf9e1d11f1008777dae (diff)
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."
-rw-r--r--src/pulsecore/module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c
index c57acac2a..bee8a20ef 100644
--- a/src/pulsecore/module.c
+++ b/src/pulsecore/module.c
@@ -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;