projects
/
platform
/
upstream
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
588af08
)
module: Replace rindex() with strrchr()
author
Tanu Kaskinen
<tanu.kaskinen@linux.intel.com>
Mon, 27 Jan 2014 19:00:58 +0000
(21:00 +0200)
committer
Tanu Kaskinen
<tanu.kaskinen@linux.intel.com>
Mon, 27 Jan 2014 19:00:58 +0000
(21:00 +0200)
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."
src/pulsecore/module.c
patch
|
blob
|
history
diff --git
a/src/pulsecore/module.c
b/src/pulsecore/module.c
index
c57acac
..
bee8a20
100644
(file)
--- 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;