summaryrefslogtreecommitdiffstats
path: root/streaming/rrdpush.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-04-26 16:22:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-04-26 16:22:17 +0000
commit58b482856cf37b0519e516ab8dc1105ba958f8b2 (patch)
tree0c46396e98741dfae4ce907bc8ef8c54418b3753 /streaming/rrdpush.c
parentAdding upstream version 1.14.0~rc0. (diff)
downloadnetdata-58b482856cf37b0519e516ab8dc1105ba958f8b2.tar.xz
netdata-58b482856cf37b0519e516ab8dc1105ba958f8b2.zip
Adding upstream version 1.14.0.upstream/1.14.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'streaming/rrdpush.c')
-rw-r--r--streaming/rrdpush.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/streaming/rrdpush.c b/streaming/rrdpush.c
index b98d0b3dc..acf69ffd3 100644
--- a/streaming/rrdpush.c
+++ b/streaming/rrdpush.c
@@ -151,13 +151,15 @@ static inline void rrdpush_send_chart_definition_nolock(RRDSET *st) {
// properly set the name for the remote end to parse it
char *name = "";
- if(unlikely(strcmp(st->id, st->name))) {
- // they differ
- name = strchr(st->name, '.');
- if(name)
- name++;
- else
- name = "";
+ if(likely(st->name)) {
+ if(unlikely(strcmp(st->id, st->name))) {
+ // they differ
+ name = strchr(st->name, '.');
+ if(name)
+ name++;
+ else
+ name = "";
+ }
}
// info("CHART '%s' '%s'", st->id, name);