Avoid clearing already unset flags. (#12727)
If memory mode is save, map or ram the set's flags are initialized to 0. Otherwise, the set is calloc'd which will make the set have 0 flags.
vkalintiris committed
May 2, 2022 at 18:00 UTC
272b61424c9a8eb90e30aa5eccd31eacac233e7c
1 file changed
-8
database/rrdset.c
-8
@@ -871,14 +871,6 @@ RRDSET *rrdset_create_custom(
871
else
872
rrdset_flag_clear(st, RRDSET_FLAG_ENABLED);
873
874
- rrdset_flag_clear(st, RRDSET_FLAG_DETAIL);
875
- rrdset_flag_clear(st, RRDSET_FLAG_DEBUG);
876
- rrdset_flag_clear(st, RRDSET_FLAG_OBSOLETE);
877
- rrdset_flag_clear(st, RRDSET_FLAG_EXPORTING_SEND);
878
- rrdset_flag_clear(st, RRDSET_FLAG_EXPORTING_IGNORE);
879
- rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_SEND);
880
- rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_IGNORE);
881
- rrdset_flag_clear(st, RRDSET_FLAG_UPSTREAM_EXPOSED);
874
rrdset_flag_set(st, RRDSET_FLAG_SYNC_CLOCK);
875
876
st->green = NAN;