diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-11-15 04:26:38 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-11-15 04:26:38 +0000 |
commit | 70a8b27948bbe52d4be3e457b16516058510d7bb (patch) | |
tree | 6a43968c812f1038488954c987a9a36a4b96fd6f /epan/dfilter/dfilter.c | |
parent | 91398db56b3244a6eea5993945be6da4ab41844a (diff) | |
download | wireshark-70a8b27948bbe52d4be3e457b16516058510d7bb.tar.gz |
Get rid of the depth argument to dfilter_macro_apply(); have an internal
routine that does all the work and that takes a depth argumen, and an
external routine that calls that internal routine with a depth argument
of 0. The depth is only of use internally, to avoid infinite recursion.
When recursing with that routine, pass depth+1 as the depth value,
rather than passing depth and incrementing it afterwards; the latter
doesn't prevent infinite recursion. (Thanks and a tip of the hat to
Clang Cat for catching this.)
Squelch some other (harmless) warnings from Clang Cat.
Clean up indentation.
svn path=/trunk/; revision=39838
Diffstat (limited to 'epan/dfilter/dfilter.c')
-rw-r--r-- | epan/dfilter/dfilter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dfilter/dfilter.c b/epan/dfilter/dfilter.c index 143693123d..668d8191ad 100644 --- a/epan/dfilter/dfilter.c +++ b/epan/dfilter/dfilter.c @@ -230,7 +230,7 @@ dfilter_compile(const gchar *text, dfilter_t **dfp) dfilter_error_msg = NULL; - if ( !( text = dfilter_macro_apply(text, 0, &dfilter_error_msg) ) ) { + if ( !( text = dfilter_macro_apply(text, &dfilter_error_msg) ) ) { return FALSE; } |