From 44224339b43a2a4e383990108588530fb5c22640 Mon Sep 17 00:00:00 2001 From: jmayer Date: Sun, 25 Jan 2004 17:22:57 +0000 Subject: Remove the cast again and do the proper fix (add right type to union) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9844 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/ftypes/ftype-bytes.c | 6 +++--- epan/ftypes/ftypes.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'epan') diff --git a/epan/ftypes/ftype-bytes.c b/epan/ftypes/ftype-bytes.c index e8f1bf75e1..b73b3288cb 100644 --- a/epan/ftypes/ftype-bytes.c +++ b/epan/ftypes/ftype-bytes.c @@ -1,5 +1,5 @@ /* - * $Id: ftype-bytes.c,v 1.23 2004/01/25 17:07:57 jmayer Exp $ + * $Id: ftype-bytes.c,v 1.24 2004/01/25 17:22:57 jmayer Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -558,7 +558,7 @@ cmp_contains(fvalue_t *fv_a, fvalue_t *fv_b) static gboolean cmp_matches(fvalue_t *fv_a, fvalue_t *fv_b) { - GByteArray *a = fv_a->value.bytes; + GString *a = fv_a->value.gstring; pcre_tuple_t *pcre = fv_b->value.re; int options = 0; int rc; @@ -576,7 +576,7 @@ cmp_matches(fvalue_t *fv_a, fvalue_t *fv_b) rc = pcre_exec( pcre->re, /* Compiled PCRE */ pcre->ex, /* PCRE extra from pcre_study() */ - (const char *) a->data, /* The data to check for the pattern... */ + a->str, /* The data to check for the pattern... */ a->len, /* ... and its length */ 0, /* Start offset within data */ options, /* PCRE options */ diff --git a/epan/ftypes/ftypes.h b/epan/ftypes/ftypes.h index ce6c8bfa2a..75300280b2 100644 --- a/epan/ftypes/ftypes.h +++ b/epan/ftypes/ftypes.h @@ -1,7 +1,7 @@ /* ftypes.h * Definitions for field types * - * $Id: ftypes.h,v 1.28 2003/12/10 21:12:02 gerald Exp $ + * $Id: ftypes.h,v 1.29 2004/01/25 17:22:57 jmayer Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -142,6 +142,7 @@ typedef struct _fvalue_t { gdouble floating; gchar *string; GByteArray *bytes; + GString *gstring; ipv4_addr ipv4; nstime_t time; tvbuff_t *tvb; -- cgit v1.2.3