diff options
author | Shane Kerr <shane@isc.org> | 2007-08-22 13:41:37 +0000 |
---|---|---|
committer | Shane Kerr <shane@isc.org> | 2007-08-22 13:41:37 +0000 |
commit | 06eb8bab557b390c5215d830cb947fba54f6816b (patch) | |
tree | d5a94c90f1962ba8907fd5834f61c15baa0be384 /common/tree.c | |
parent | af00522b3ef2405e9516f3ce2b53afbdcb30d8ca (diff) | |
download | isc-dhcp-06eb8bab557b390c5215d830cb947fba54f6816b.tar.gz |
Fix a number of warnings (and a few real bugs) found by enabling
gcc warnings.
See RT ticket #17013 for more.
Diffstat (limited to 'common/tree.c')
-rw-r--r-- | common/tree.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/common/tree.c b/common/tree.c index 68844bef..aa5903af 100644 --- a/common/tree.c +++ b/common/tree.c @@ -1002,7 +1002,7 @@ int evaluate_boolean_expression (result, packet, lease, client_state, struct binding *binding; struct binding_value *bv, *obv; #ifdef HAVE_REGEX_H - int reg_st, regflags = REG_EXTENDED | REG_NOSUB; + int regflags = REG_EXTENDED | REG_NOSUB; regex_t re; #endif @@ -1139,7 +1139,15 @@ int evaluate_boolean_expression (result, packet, lease, client_state, data_string_forget(&right, MDL); regfree(&re); - return reg_st; + + /* + * If we have bleft and bright then we have a good + * syntax, otherwise not. + * + * XXX: we don't warn on invalid regular expression + * syntax, should we? + */ + return bleft && bright; #else /* It shouldn't be possible to configure a regex operator * when there's no support. |