]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fix identical inner if condition rrd_graph_helper
authorWolfgang Stöggl <c72578@yahoo.de>
Mon, 8 Jul 2019 12:06:28 +0000 (14:06 +0200)
committerTobias Oetiker <tobi@oetiker.ch>
Tue, 9 Jul 2019 07:15:03 +0000 (09:15 +0200)
- Fixes the following Cppcheck warning:
  [src/rrd_graph_helper.c:972] (warning) Identical inner 'if' condition
  is always true
  (outer condition is '!vname' and inner condition is '!vname').
  [identicalInnerCondition]

src/rrd_graph_helper.c

index b1d03e4ff2938fa3f5749591ae4aa72cbe23d0ba..dde3e0ac8ae45726dfaad65410ffe70a1dc17e3b 100644 (file)
@@ -969,9 +969,7 @@ static graph_desc_t *newGraphDescription(
             }
             dprintfparsed("got positional vname and rrd: %s - %s\n",
                           first->key, first->value);
-            if (!vname) {
-                vname = first->value;
-            }
+            vname = first->value;
         }
     }