diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-10-11 07:06:43 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-10-11 07:06:43 +0000 |
commit | 6b5159e8deeebf126fc734454a7e1414acfb38da (patch) | |
tree | 1463034c7393e66fe664a2668110b0d632eb8926 /dfilter-grammar.y | |
parent | 3b9013d39358c54611c8ba82595c3a4ff2f596eb (diff) |
Solaris 7 (and perhaps other OSes) lack INADDR_NONE; it doesn't matter
what we set "node->value.numeric" to if we failed to convert a string to
an IP address (that failure means "dfilter_compile()" will throw the
filter away and return NULL), so just set it to 0.
svn path=/trunk/; revision=804
Diffstat (limited to 'dfilter-grammar.y')
-rw-r--r-- | dfilter-grammar.y | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dfilter-grammar.y b/dfilter-grammar.y index 0f298bd2a0..722a74bf99 100644 --- a/dfilter-grammar.y +++ b/dfilter-grammar.y @@ -3,7 +3,7 @@ /* dfilter-grammar.y * Parser for display filters * - * $Id: dfilter-grammar.y,v 1.22 1999/10/11 06:39:04 guy Exp $ + * $Id: dfilter-grammar.y,v 1.23 1999/10/11 07:06:43 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -548,7 +548,10 @@ dfilter_mknode_ipv4_value(char *host) /* "Scientist, you've failed." */ dfilter_fail("\"%s\" isn't a valid host name or IP address.", host); - node->value.numeric = INADDR_NONE; + + /* Stuff a value in here; it doesn't matter what it is, + as we'll throw the tree away anyway. */ + node->value.numeric = 0; } node->value.numeric = htonl(node->value.numeric); gnode = g_node_new(node); |