[pulseaudio-commits] src/pulsecore

Tanu Kaskinen tanuk at kemper.freedesktop.org
Mon Jan 27 11:03:41 PST 2014


 src/pulsecore/module.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit eab0544f230ae4d89d139a9a7af1a7281c40689a
Author: Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
Date:   Mon Jan 27 21:00:58 2014 +0200

    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."

diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c
index c57acac..bee8a20 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;
 



More information about the pulseaudio-commits mailing list