]> arthur.barton.de Git - netdata.git/commitdiff
minor code re-writes to avoid coverity false positives; updated installer banner...
authorCosta Tsaousis <costa@tsaousis.gr>
Sun, 21 Aug 2016 19:57:02 +0000 (22:57 +0300)
committerCosta Tsaousis <costa@tsaousis.gr>
Sun, 21 Aug 2016 19:57:02 +0000 (22:57 +0300)
README.md
netdata-installer.sh
src/plugin_tc.c
src/rrd.c

index 47ed5bfecfe7880905da1f1ee16e9eeeca6a04aa..e02c5d5a652d0405d2882c23e641a2326bc3ca35 100644 (file)
--- a/README.md
+++ b/README.md
 
 # netdata
 
+
+> Aug 21st, 2016: Netdata got **[health monitoring](https://github.com/firehol/netdata/wiki/health-monitoring)** - alarms
+
+---
+
 > May 16th, 2016
 >
 > [netdata v1.2.0 released!](https://github.com/firehol/netdata/releases)
index 4ffddbcd12a419a8943904b6601012874b542b61..d6e78681b592afb7aed7020e4ab549a3c6d87452 100755 (executable)
@@ -3,6 +3,8 @@
 # reload the user profile
 [ -f /etc/profile ] && . /etc/profile
 
+export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+
 # fix PKG_CHECK_MODULES error
 if [ -d /usr/share/aclocal ]
 then
@@ -175,7 +177,7 @@ done
 cat <<BANNER
 
 Welcome to netdata!
-Nice to see you are giving it a try!
+The real-time performance monitoring system.
 
 You are about to build and install netdata to your system.
 
index 7d521818ed50133be8ab96e766375c9f6375c7c0..408069dba839767908f1f841b3f888d6f135457a 100644 (file)
@@ -129,14 +129,16 @@ static inline struct tc_class *tc_class_index_find(struct tc_device *st, const c
 // ----------------------------------------------------------------------------
 
 static inline void tc_class_free(struct tc_device *n, struct tc_class *c) {
-    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);
-
+    if(c == n->classes) {
+        if(c->next)
+            n->classes = c->next;
+        else
+            n->classes = c->prev;
+    }
     if(c->next) c->next->prev = c->prev;
     if(c->prev) c->prev->next = c->next;
-    if(n->classes == c) {
-        if(c->next) n->classes = c->next;
-        else n->classes = c->prev;
-    }
+
+    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);
 
     tc_class_index_del(n, c);
 
index bb5cbd91d400783275847e07dfefb431b427439d..bec7f9e714792f28a0dc30c2f19ae3700e710da7 100644 (file)
--- a/src/rrd.c
+++ b/src/rrd.c
@@ -722,16 +722,17 @@ void rrddim_free(RRDSET *st, RRDDIM *rd)
 {
     debug(D_RRD_CALLS, "rrddim_free() %s.%s", st->name, rd->name);
 
-    RRDDIM *i, *last = NULL;
-    for(i = st->dimensions; i && i != rd ; i = i->next) last = i;
+    if(rd == st->dimensions)
+        st->dimensions = rd->next;
+    else {
+        RRDDIM *i;
+        for (i = st->dimensions; i && i->next != rd; i = i->next) ;
 
-    if(!i) {
-        error("Request to free dimension %s.%s but it is not linked.", st->id, rd->name);
-        return;
+        if (i && i->next == rd)
+            i->next = rd->next;
+        else
+            error("Request to free dimension '%s.%s' but it is not linked.", st->id, rd->name);
     }
-
-    if(last) last->next = rd->next;
-    else st->dimensions = rd->next;
     rd->next = NULL;
 
     while(rd->variables)