From: Ruben Kerkhof Date: Sat, 23 Apr 2016 08:25:40 +0000 (+0200) Subject: daemon/common.c: remove unused function X-Git-Tag: collectd-5.6.0~329^2~44 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8101a5c5d1487bccf7922961ccb4dc54d92a761d;p=collectd.git daemon/common.c: remove unused function Found with cppcheck --- diff --git a/src/daemon/common.c b/src/daemon/common.c index 7b7353d9..aedf8b27 100644 --- a/src/daemon/common.c +++ b/src/daemon/common.c @@ -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; diff --git a/src/daemon/common.h b/src/daemon/common.h index c3f7f548..7b4eb3ab 100644 --- a/src/daemon/common.h +++ b/src/daemon/common.h @@ -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