From 8101a5c5d1487bccf7922961ccb4dc54d92a761d Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 23 Apr 2016 10:25:40 +0200 Subject: [PATCH] daemon/common.c: remove unused function Found with cppcheck --- src/daemon/common.c | 21 --------------------- src/daemon/common.h | 2 -- 2 files changed, 23 deletions(-) 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 -- 2.11.0