summaryrefslogtreecommitdiffstats
path: root/database/rrd.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:05 +0000
commit97e01009d69b8fbebfebf68f51e3d126d0ed43fc (patch)
tree02e8b836c3a9d89806f3e67d4a5fe9f52dbb0061 /database/rrd.c
parentReleasing debian version 1.36.1-1. (diff)
downloadnetdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.tar.xz
netdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.zip
Merging upstream version 1.37.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'database/rrd.c')
-rw-r--r--database/rrd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/database/rrd.c b/database/rrd.c
index f91039ea..df364419 100644
--- a/database/rrd.c
+++ b/database/rrd.c
@@ -154,3 +154,15 @@ char *rrdset_cache_dir(RRDHOST *host, const char *id) {
return ret;
}
+// ----------------------------------------------------------------------------
+// RRD - string management
+
+STRING *rrd_string_strdupz(const char *s) {
+ if(unlikely(!s || !*s)) return string_strdupz(s);
+
+ char *tmp = strdupz(s);
+ json_fix_string(tmp);
+ STRING *ret = string_strdupz(tmp);
+ freez(tmp);
+ return ret;
+}