daemon/common.c: remove unused function
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 08:25:40 +0000 (10:25 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 08:25:40 +0000 (10:25 +0200)
Found with cppcheck

src/daemon/common.c
src/daemon/common.h

index 7b7353d..aedf8b2 100644 (file)
@@ -373,27 +373,6 @@ int strjoin (char *buffer, size_t buffer_size,
        return ((int) strlen (buffer));
 }
 
-int strsubstitute (char *str, char c_from, char c_to)
-{
-       int ret;
-
-       if (str == NULL)
-               return (-1);
-
-       ret = 0;
-       while (*str != '\0')
-       {
-               if (*str == c_from)
-               {
-                       *str = c_to;
-                       ret++;
-               }
-               str++;
-       }
-
-       return (ret);
-} /* int strsubstitute */
-
 int escape_string (char *buffer, size_t buffer_size)
 {
   char *temp;
index c3f7f54..7b4eb3a 100644 (file)
@@ -224,8 +224,6 @@ int escape_string (char *buffer, size_t buffer_size);
  */
 void replace_special (char *buffer, size_t buffer_size);
 
-int strsubstitute (char *str, char c_from, char c_to);
-
 /*
  * NAME
  *   strunescape