X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Futils_subst.c;h=0b5f00d14577b711751a86396b3d87da0d3aeae9;hb=c4439c9cb3e2348ad7013644731de27a55eca478;hp=546ca186f812fd4b5a672b20b0340d4e4bb4b039;hpb=4c4988b1c5d33ed70b2d6d6e5a4eae13cab9255b;p=collectd.git diff --git a/src/daemon/utils_subst.c b/src/daemon/utils_subst.c index 546ca186..0b5f00d1 100644 --- a/src/daemon/utils_subst.c +++ b/src/daemon/utils_subst.c @@ -30,7 +30,7 @@ #include "collectd.h" -#include "common.h" +#include "utils/common/common.h" #include "utils_subst.h" char *subst(char *buf, size_t buflen, const char *string, size_t off1, @@ -90,28 +90,6 @@ char *subst(char *buf, size_t buflen, const char *string, size_t off1, return buf; } /* subst */ -char *asubst(const char *string, int off1, int off2, const char *replacement) { - char *buf; - int len; - - char *ret; - - if ((NULL == string) || (0 > off1) || (0 > off2) || (off1 > off2) || - (NULL == replacement)) - return NULL; - - len = off1 + strlen(replacement) + strlen(string) - off2 + 1; - - buf = malloc(len); - if (NULL == buf) - return NULL; - - ret = subst(buf, len, string, off1, off2, replacement); - if (NULL == ret) - free(buf); - return ret; -} /* asubst */ - char *subst_string(char *buf, size_t buflen, const char *string, const char *needle, const char *replacement) { size_t needle_len;