]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Missing boolean comparison added.
authorOndrej Filip <feela@majklik.network.cz>
Thu, 28 May 2009 11:37:04 +0000 (13:37 +0200)
committerOndrej Filip <feela@majklik.network.cz>
Thu, 28 May 2009 11:37:04 +0000 (13:37 +0200)
filter/filter.c
filter/test.conf

index 313d2fa7e8fb042cb467b77f32aa89ba43dcc1e0..944befb181439f750024c0ed8ca90ff930ebb174 100644 (file)
@@ -120,7 +120,8 @@ val_compare(struct f_val v1, struct f_val v2)
   }
   switch (v1.type) {
   case T_ENUM:
-  case T_INT: 
+  case T_INT:
+  case T_BOOL:
   case T_PAIR:
     if (v1.val.i == v2.val.i) return 0;
     if (v1.val.i < v2.val.i) return -1;
index af88907335f43ed84ca37c448aa495b3cecd442d..f1cdf04c20c61a428349feb731b0d97fca20a4a0 100644 (file)
@@ -155,6 +155,9 @@ string s;
        
        b = true;
        print "Testing bool: ", b, ", ", !b;
+
+        if ( b = true ) then print "Testing bool comparison b = true: ", b;
+       else { print "*** FAIL: TRUE test failed" ; quitbird; }
        
        pxs = [ 1.2.0.0/16, 1.4.0.0/16+];
        print "Testing prefix sets: ";
@@ -202,4 +205,4 @@ int j;
        accept "ok I take that";
 }
 
-eval __startup();
\ No newline at end of file
+eval __startup();