diff options
author | Ted Lemon <source@isc.org> | 1998-11-06 03:25:17 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 1998-11-06 03:25:17 +0000 |
commit | 5fd5c0a35f6435165ee2c8d19f3defa7d822688f (patch) | |
tree | 2fc899b768af5a6c15ff5bdc0776f560a883b723 /common | |
parent | b3f15965cccaf133bc74d49684c5e91a3fb9dfac (diff) | |
download | isc-dhcp-5fd5c0a35f6435165ee2c8d19f3defa7d822688f.tar.gz |
Fix evaluate_boolean_expression_result to actually evaluate a *boolean* expression.
Diffstat (limited to 'common')
-rw-r--r-- | common/tree.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/common/tree.c b/common/tree.c index 7bdb38a8..57588e65 100644 --- a/common/tree.c +++ b/common/tree.c @@ -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; } |