]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Revert breaking change to cmp_node
authorQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 9 Aug 2016 20:28:35 +0000 (20:28 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 9 Aug 2016 20:28:35 +0000 (20:28 +0000)
Bad conditional refactor broke graph deduplication
and thus disambiguation precedence

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
lib/command_parse.y

index bbdf11c6e84a06058450b5da5906babb7db2cf42..690832357a383c23352c6977f5d190bc63c2fef0 100644 (file)
@@ -478,8 +478,11 @@ cmp_node (struct graph_node *first, struct graph_node *second)
   switch (first->type) {
     case WORD_GN:
     case VARIABLE_GN:
-      if (first->text && second->text && strcmp (first->text, second->text))
-        return 0;
+      if (first->text && second->text)
+        {
+          if (strcmp (first->text, second->text))
+          return 0;
+        }
       else if (first->text != second->text) return 0;
       break;
     case RANGE_GN: