@cryptotaxi247 / netdata-1 / commits / 14213f519

minor code re-writes to avoid coverity false positives; updated installer banner and readme

Costa Tsaousis committed Aug 21, 2016 at 22:57 UTC 14213f51973c6752d2bee2254ee0811214fc6d11
4 files changed +25 -15
README.md
+5
@@ -11,6 +11,11 @@
11
12 # netdata
13
14 +
15 +> Aug 21st, 2016: Netdata got **[health monitoring](https://github.com/firehol/netdata/wiki/health-monitoring)** - alarms
16 +
17 +---
18 +
19 > May 16th, 2016
20 >
21 > [netdata v1.2.0 released!](https://github.com/firehol/netdata/releases)
netdata-installer.sh
+3 -1
@@ -3,6 +3,8 @@
3 # reload the user profile
4 [ -f /etc/profile ] && . /etc/profile
5
6 +export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
7 +
8 # fix PKG_CHECK_MODULES error
9 if [ -d /usr/share/aclocal ]
10 then
@@ -175,7 +177,7 @@ done
177 cat <<BANNER
178
179 Welcome to netdata!
178 -Nice to see you are giving it a try!
180 +The real-time performance monitoring system.
181
182 You are about to build and install netdata to your system.
183
src/plugin_tc.c
+8 -6
@@ -129,14 +129,16 @@ static inline struct tc_class *tc_class_index_find(struct tc_device *st, const c
129 // ----------------------------------------------------------------------------
130
131 static inline void tc_class_free(struct tc_device *n, struct tc_class *c) {
132 - debug(D_TC_LOOP, "Removing from device '%s' class '%s', parentid '%s', leafid '%s', seen=%d", n->id, c->id, c->parentid?c->parentid:"", c->leafid?c->leafid:"", c->seen);
133 -
132 + if(c == n->classes) {
133 + if(c->next)
134 + n->classes = c->next;
135 + else
136 + n->classes = c->prev;
137 + }
138 if(c->next) c->next->prev = c->prev;
139 if(c->prev) c->prev->next = c->next;
136 - if(n->classes == c) {
137 - if(c->next) n->classes = c->next;
138 - else n->classes = c->prev;
139 - }
140 +
141 + debug(D_TC_LOOP, "Removing from device '%s' class '%s', parentid '%s', leafid '%s', seen=%d", n->id, c->id, c->parentid?c->parentid:"", c->leafid?c->leafid:"", c->seen);
142
143 tc_class_index_del(n, c);
144
src/rrd.c
+9 -8
@@ -722,16 +722,17 @@ void rrddim_free(RRDSET *st, RRDDIM *rd)
722 {
723 debug(D_RRD_CALLS, "rrddim_free() %s.%s", st->name, rd->name);
724
725 - RRDDIM *i, *last = NULL;
726 - for(i = st->dimensions; i && i != rd ; i = i->next) last = i;
725 + if(rd == st->dimensions)
726 + st->dimensions = rd->next;
727 + else {
728 + RRDDIM *i;
729 + for (i = st->dimensions; i && i->next != rd; i = i->next) ;
730
728 - if(!i) {
729 - error("Request to free dimension %s.%s but it is not linked.", st->id, rd->name);
730 - return;
731 + if (i && i->next == rd)
732 + i->next = rd->next;
733 + else
734 + error("Request to free dimension '%s.%s' but it is not linked.", st->id, rd->name);
735 }
732 -
733 - if(last) last->next = rd->next;
734 - else st->dimensions = rd->next;
736 rd->next = NULL;
737
738 while(rd->variables)