aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ftypes/ftype-bytes.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/ftypes/ftype-bytes.c')
-rw-r--r--epan/ftypes/ftype-bytes.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/epan/ftypes/ftype-bytes.c b/epan/ftypes/ftype-bytes.c
index ee15aa508e..dc414e3e62 100644
--- a/epan/ftypes/ftype-bytes.c
+++ b/epan/ftypes/ftype-bytes.c
@@ -650,21 +650,10 @@ cmp_contains(const fvalue_t *fv_a, const fvalue_t *fv_b)
}
static gboolean
-cmp_matches(const fvalue_t *fv_a, const fvalue_t *fv_b)
+cmp_matches(const fvalue_t *fv, const GRegex *regex)
{
- GByteArray *a = fv_a->value.bytes;
- GRegex *regex = fv_b->value.re;
+ GByteArray *a = fv->value.bytes;
- /* fv_b is always a FT_PCRE, otherwise the dfilter semcheck() would have
- * warned us. For the same reason (and because we're using g_malloc()),
- * fv_b->value.re is not NULL.
- */
- if (strcmp(fv_b->ftype->name, "FT_PCRE") != 0) {
- return FALSE;
- }
- if (! regex) {
- return FALSE;
- }
return g_regex_match_full(
regex, /* Compiled PCRE */
(char *)a->data, /* The data to check for the pattern... */