]> arthur.barton.de Git - netdata.git/blobdiff - src/rrdcalc.c
properly initialize the just allocated global structures
[netdata.git] / src / rrdcalc.c
index bdd66c2b8b7e8028eedcc6cde93eb2591cc7b3b2..1f1845409e409f5ba37696cbcb2afb9af878847a 100644 (file)
@@ -285,7 +285,7 @@ inline void rrdcalc_create_part2(RRDHOST *host, RRDCALC *rc) {
 
     // link it to its chart
     RRDSET *st;
-    for(st = host->rrdset_root; st ; st = st->next) {
+    rrdset_foreach_read(st, host) {
         if(rrdcalc_is_matching_this_rrdset(rc, st)) {
             rrdsetcalc_link(st, rc);
             break;