]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Fix evaluate_boolean_expression_result to actually evaluate a *boolean* expression.
authorTed Lemon <source@isc.org>
Fri, 6 Nov 1998 03:25:17 +0000 (03:25 +0000)
committerTed Lemon <source@isc.org>
Fri, 6 Nov 1998 03:25:17 +0000 (03:25 +0000)
common/tree.c

index 7bdb38a88d455a5edabc0ba7df0dc9695cfac551..57588e65061018c0be7840a048b4e874cb9fb188 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: tree.c,v 1.16 1998/11/06 02:43:10 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: tree.c,v 1.17 1998/11/06 03:25:17 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -925,7 +925,6 @@ int evaluate_boolean_expression_result (packet, options, expr)
        struct option_state *options;
        struct expression *expr;
 {
-       struct data_string ds;
        int result;
 
        /* So that we can be called with option_lookup as an argument. */
@@ -933,14 +932,9 @@ int evaluate_boolean_expression_result (packet, options, expr)
                return 0;
        
        memset (&ds, 0, sizeof ds);
-       if (!evaluate_data_expression (&ds, packet, options, expr))
+       if (!evaluate_boolean_expression (&result, packet, options, expr))
                return 0;
 
-       if (ds.len && ds.data [0])
-               result = 1;
-       else
-               result = 0;
-       data_string_forget (&ds, "evaluate_boolean_expression_result");
        return result;
 }