Use ISO C strchr() instead of BSD index()
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 25 Sep 2014 10:46:39 +0000 (11:46 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 25 Sep 2014 11:59:50 +0000 (12:59 +0100)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24307

bus/signals.c

index b283c4d..119d813 100644 (file)
@@ -22,7 +22,9 @@
  */
 
 #include <config.h>
-#include <strings.h>
+
+#include <string.h>
+
 #include "signals.h"
 #include "services.h"
 #include "utils.h"
@@ -130,7 +132,7 @@ append_key_and_escaped_value (DBusString *str, const char *token, const char *va
 
   while (*p != '\0')
     {
-      const char *next = index (p, '\'');
+      const char *next = strchr (p, '\'');
 
       if (next)
         {