aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ftypes
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2012-11-06 13:28:59 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2012-11-06 13:28:59 +0000
commit8909d388424bbb73fa0037a647261e1b940bce5d (patch)
tree88d2bc49ecbda0e4838ee4d82b9848d7620cc863 /epan/ftypes
parentcdc278aefd2c928b4217ea2724bc08361f8cb389 (diff)
When comparing fvalue_t we don't modify them, make arguments const.
svn path=/trunk/; revision=45948
Diffstat (limited to 'epan/ftypes')
-rw-r--r--epan/ftypes/ftype-bytes.c18
-rw-r--r--epan/ftypes/ftype-double.c12
-rw-r--r--epan/ftypes/ftype-guid.c4
-rw-r--r--epan/ftypes/ftype-integer.c48
-rw-r--r--epan/ftypes/ftype-ipv4.c14
-rw-r--r--epan/ftypes/ftype-ipv6.c18
-rw-r--r--epan/ftypes/ftype-string.c16
-rw-r--r--epan/ftypes/ftype-time.c12
-rw-r--r--epan/ftypes/ftype-tvbuff.c16
-rw-r--r--epan/ftypes/ftypes.c18
-rw-r--r--epan/ftypes/ftypes.h20
11 files changed, 98 insertions, 98 deletions
diff --git a/epan/ftypes/ftype-bytes.c b/epan/ftypes/ftype-bytes.c
index 575f6b7038..e9ece85f02 100644
--- a/epan/ftypes/ftype-bytes.c
+++ b/epan/ftypes/ftype-bytes.c
@@ -338,7 +338,7 @@ slice(fvalue_t *fv, GByteArray *bytes, guint offset, guint length)
static gboolean
-cmp_eq(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_eq(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
GByteArray *a = fv_a->value.bytes;
GByteArray *b = fv_b->value.bytes;
@@ -352,7 +352,7 @@ cmp_eq(fvalue_t *fv_a, fvalue_t *fv_b)
static gboolean
-cmp_ne(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_ne(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
GByteArray *a = fv_a->value.bytes;
GByteArray *b = fv_b->value.bytes;
@@ -366,7 +366,7 @@ cmp_ne(fvalue_t *fv_a, fvalue_t *fv_b)
static gboolean
-cmp_gt(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_gt(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
GByteArray *a = fv_a->value.bytes;
GByteArray *b = fv_b->value.bytes;
@@ -383,7 +383,7 @@ cmp_gt(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_ge(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_ge(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
GByteArray *a = fv_a->value.bytes;
GByteArray *b = fv_b->value.bytes;
@@ -400,7 +400,7 @@ cmp_ge(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_lt(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_lt(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
GByteArray *a = fv_a->value.bytes;
GByteArray *b = fv_b->value.bytes;
@@ -417,7 +417,7 @@ cmp_lt(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_le(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_le(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
GByteArray *a = fv_a->value.bytes;
GByteArray *b = fv_b->value.bytes;
@@ -434,7 +434,7 @@ cmp_le(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_bitwise_and(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_bitwise_and(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
GByteArray *a = fv_a->value.bytes;
GByteArray *b = fv_b->value.bytes;
@@ -456,7 +456,7 @@ cmp_bitwise_and(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_contains(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_contains(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
GByteArray *a = fv_a->value.bytes;
GByteArray *b = fv_b->value.bytes;
@@ -470,7 +470,7 @@ cmp_contains(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_matches(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_matches(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
GByteArray *a = fv_a->value.bytes;
GRegex *regex = fv_b->value.re;
diff --git a/epan/ftypes/ftype-double.c b/epan/ftypes/ftype-double.c
index 0e6564e08c..1e517d27bd 100644
--- a/epan/ftypes/ftype-double.c
+++ b/epan/ftypes/ftype-double.c
@@ -115,37 +115,37 @@ double_val_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, char *buf)
}
static gboolean
-cmp_eq(fvalue_t *a, fvalue_t *b)
+cmp_eq(const fvalue_t *a, const fvalue_t *b)
{
return a->value.floating == b->value.floating;
}
static gboolean
-cmp_ne(fvalue_t *a, fvalue_t *b)
+cmp_ne(const fvalue_t *a, const fvalue_t *b)
{
return a->value.floating != b->value.floating;
}
static gboolean
-cmp_gt(fvalue_t *a, fvalue_t *b)
+cmp_gt(const fvalue_t *a, const fvalue_t *b)
{
return a->value.floating > b->value.floating;
}
static gboolean
-cmp_ge(fvalue_t *a, fvalue_t *b)
+cmp_ge(const fvalue_t *a, const fvalue_t *b)
{
return a->value.floating >= b->value.floating;
}
static gboolean
-cmp_lt(fvalue_t *a, fvalue_t *b)
+cmp_lt(const fvalue_t *a, const fvalue_t *b)
{
return a->value.floating < b->value.floating;
}
static gboolean
-cmp_le(fvalue_t *a, fvalue_t *b)
+cmp_le(const fvalue_t *a, const fvalue_t *b)
{
return a->value.floating <= b->value.floating;
}
diff --git a/epan/ftypes/ftype-guid.c b/epan/ftypes/ftype-guid.c
index e46a8a6d40..ba3037c9bf 100644
--- a/epan/ftypes/ftype-guid.c
+++ b/epan/ftypes/ftype-guid.c
@@ -111,13 +111,13 @@ guid_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, char *buf)
}
static gboolean
-cmp_eq(fvalue_t *a, fvalue_t *b)
+cmp_eq(const fvalue_t *a, const fvalue_t *b)
{
return memcmp(&a->value.guid, &b->value.guid, sizeof(e_guid_t)) == 0;
}
static gboolean
-cmp_ne(fvalue_t *a, fvalue_t *b)
+cmp_ne(const fvalue_t *a, const fvalue_t *b)
{
return memcmp(&a->value.guid, &b->value.guid, sizeof(e_guid_t)) != 0;
}
diff --git a/epan/ftypes/ftype-integer.c b/epan/ftypes/ftype-integer.c
index 4a05c7600a..123238d76b 100644
--- a/epan/ftypes/ftype-integer.c
+++ b/epan/ftypes/ftype-integer.c
@@ -291,67 +291,67 @@ ipxnet_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, char *buf)
}
static gboolean
-cmp_eq(fvalue_t *a, fvalue_t *b)
+cmp_eq(const fvalue_t *a, const fvalue_t *b)
{
return a->value.uinteger == b->value.uinteger;
}
static gboolean
-cmp_ne(fvalue_t *a, fvalue_t *b)
+cmp_ne(const fvalue_t *a, const fvalue_t *b)
{
return a->value.uinteger != b->value.uinteger;
}
static gboolean
-u_cmp_gt(fvalue_t *a, fvalue_t *b)
+u_cmp_gt(const fvalue_t *a, const fvalue_t *b)
{
return a->value.uinteger > b->value.uinteger;
}
static gboolean
-u_cmp_ge(fvalue_t *a, fvalue_t *b)
+u_cmp_ge(const fvalue_t *a, const fvalue_t *b)
{
return a->value.uinteger >= b->value.uinteger;
}
static gboolean
-u_cmp_lt(fvalue_t *a, fvalue_t *b)
+u_cmp_lt(const fvalue_t *a, const fvalue_t *b)
{
return a->value.uinteger < b->value.uinteger;
}
static gboolean
-u_cmp_le(fvalue_t *a, fvalue_t *b)
+u_cmp_le(const fvalue_t *a, const fvalue_t *b)
{
return a->value.uinteger <= b->value.uinteger;
}
static gboolean
-s_cmp_gt(fvalue_t *a, fvalue_t *b)
+s_cmp_gt(const fvalue_t *a, const fvalue_t *b)
{
return a->value.sinteger > b->value.sinteger;
}
static gboolean
-s_cmp_ge(fvalue_t *a, fvalue_t *b)
+s_cmp_ge(const fvalue_t *a, const fvalue_t *b)
{
return a->value.sinteger >= b->value.sinteger;
}
static gboolean
-s_cmp_lt(fvalue_t *a, fvalue_t *b)
+s_cmp_lt(const fvalue_t *a, const fvalue_t *b)
{
return a->value.sinteger < b->value.sinteger;
}
static gboolean
-s_cmp_le(fvalue_t *a, fvalue_t *b)
+s_cmp_le(const fvalue_t *a, const fvalue_t *b)
{
return a->value.sinteger <= b->value.sinteger;
}
static gboolean
-cmp_bitwise_and(fvalue_t *a, fvalue_t *b)
+cmp_bitwise_and(const fvalue_t *a, const fvalue_t *b)
{
return ((a->value.uinteger & b->value.uinteger) != 0);
}
@@ -492,67 +492,67 @@ uinteger64_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, char *buf)
}
static gboolean
-cmp_eq64(fvalue_t *a, fvalue_t *b)
+cmp_eq64(const fvalue_t *a, const fvalue_t *b)
{
return a->value.integer64 == b->value.integer64;
}
static gboolean
-cmp_ne64(fvalue_t *a, fvalue_t *b)
+cmp_ne64(const fvalue_t *a, const fvalue_t *b)
{
return a->value.integer64 != b->value.integer64;
}
static gboolean
-u_cmp_gt64(fvalue_t *a, fvalue_t *b)
+u_cmp_gt64(const fvalue_t *a, const fvalue_t *b)
{
return a->value.integer64 > b->value.integer64;
}
static gboolean
-u_cmp_ge64(fvalue_t *a, fvalue_t *b)
+u_cmp_ge64(const fvalue_t *a, const fvalue_t *b)
{
return a->value.integer64 >= b->value.integer64;
}
static gboolean
-u_cmp_lt64(fvalue_t *a, fvalue_t *b)
+u_cmp_lt64(const fvalue_t *a, const fvalue_t *b)
{
return a->value.integer64 < b->value.integer64;
}
static gboolean
-u_cmp_le64(fvalue_t *a, fvalue_t *b)
+u_cmp_le64(const fvalue_t *a, const fvalue_t *b)
{
return a->value.integer64 <= b->value.integer64;
}
static gboolean
-s_cmp_gt64(fvalue_t *a, fvalue_t *b)
+s_cmp_gt64(const fvalue_t *a, const fvalue_t *b)
{
return (gint64)a->value.integer64 > (gint64)b->value.integer64;
}
static gboolean
-s_cmp_ge64(fvalue_t *a, fvalue_t *b)
+s_cmp_ge64(const fvalue_t *a, const fvalue_t *b)
{
return (gint64)a->value.integer64 >= (gint64)b->value.integer64;
}
static gboolean
-s_cmp_lt64(fvalue_t *a, fvalue_t *b)
+s_cmp_lt64(const fvalue_t *a, const fvalue_t *b)
{
return (gint64)a->value.integer64 < (gint64)b->value.integer64;
}
static gboolean
-s_cmp_le64(fvalue_t *a, fvalue_t *b)
+s_cmp_le64(const fvalue_t *a, const fvalue_t *b)
{
return (gint64)a->value.integer64 <= (gint64)b->value.integer64;
}
static gboolean
-cmp_bitwise_and64(fvalue_t *a, fvalue_t *b)
+cmp_bitwise_and64(const fvalue_t *a, const fvalue_t *b)
{
return ((a->value.integer64 & b->value.integer64) != 0);
}
@@ -580,7 +580,7 @@ boolean_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, char *buf)
/* Checks for equality with zero or non-zero */
static gboolean
-bool_eq(fvalue_t *a, fvalue_t *b)
+bool_eq(const fvalue_t *a, const fvalue_t *b)
{
if (a->value.uinteger) {
if (b->value.uinteger) {
@@ -602,7 +602,7 @@ bool_eq(fvalue_t *a, fvalue_t *b)
/* Checks for inequality with zero or non-zero */
static gboolean
-bool_ne(fvalue_t *a, fvalue_t *b)
+bool_ne(const fvalue_t *a, const fvalue_t *b)
{
return (!bool_eq(a,b));
}
diff --git a/epan/ftypes/ftype-ipv4.c b/epan/ftypes/ftype-ipv4.c
index 4b7251a93a..b73998a68c 100644
--- a/epan/ftypes/ftype-ipv4.c
+++ b/epan/ftypes/ftype-ipv4.c
@@ -131,43 +131,43 @@ val_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, char *buf)
}
static gboolean
-cmp_eq(fvalue_t *a, fvalue_t *b)
+cmp_eq(const fvalue_t *a, const fvalue_t *b)
{
return ipv4_addr_eq(&a->value.ipv4, &b->value.ipv4);
}
static gboolean
-cmp_ne(fvalue_t *a, fvalue_t *b)
+cmp_ne(const fvalue_t *a, const fvalue_t *b)
{
return ipv4_addr_ne(&a->value.ipv4, &b->value.ipv4);
}
static gboolean
-cmp_gt(fvalue_t *a, fvalue_t *b)
+cmp_gt(const fvalue_t *a, const fvalue_t *b)
{
return ipv4_addr_gt(&a->value.ipv4, &b->value.ipv4);
}
static gboolean
-cmp_ge(fvalue_t *a, fvalue_t *b)
+cmp_ge(const fvalue_t *a, const fvalue_t *b)
{
return ipv4_addr_ge(&a->value.ipv4, &b->value.ipv4);
}
static gboolean
-cmp_lt(fvalue_t *a, fvalue_t *b)
+cmp_lt(const fvalue_t *a, const fvalue_t *b)
{
return ipv4_addr_lt(&a->value.ipv4, &b->value.ipv4);
}
static gboolean
-cmp_le(fvalue_t *a, fvalue_t *b)
+cmp_le(const fvalue_t *a, const fvalue_t *b)
{
return ipv4_addr_le(&a->value.ipv4, &b->value.ipv4);
}
static gboolean
-cmp_bitwise_and(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_bitwise_and(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
guint32 addr_a;
guint32 addr_b;
diff --git a/epan/ftypes/ftype-ipv6.c b/epan/ftypes/ftype-ipv6.c
index 3b45e1aae7..00890b6199 100644
--- a/epan/ftypes/ftype-ipv6.c
+++ b/epan/ftypes/ftype-ipv6.c
@@ -137,46 +137,46 @@ cmp_compare(const fvalue_t *fv_a, const fvalue_t *fv_b)
}
static gboolean
-cmp_eq(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_eq(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
return (cmp_compare(fv_a, fv_b) == 0);
}
static gboolean
-cmp_ne(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_ne(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
return (cmp_compare(fv_a, fv_b) != 0);
}
static gboolean
-cmp_gt(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_gt(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
return (cmp_compare(fv_a, fv_b) > 0);
}
static gboolean
-cmp_ge(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_ge(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
return (cmp_compare(fv_a, fv_b) >= 0);
}
static gboolean
-cmp_lt(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_lt(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
return (cmp_compare(fv_a, fv_b) < 0);
}
static gboolean
-cmp_le(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_le(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
return (cmp_compare(fv_a, fv_b) <= 0);
}
static gboolean
-cmp_bitwise_and(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_bitwise_and(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
- ipv6_addr *a = &(fv_a->value.ipv6);
- ipv6_addr *b = &(fv_b->value.ipv6);
+ const ipv6_addr *a = &(fv_a->value.ipv6);
+ const ipv6_addr *b = &(fv_b->value.ipv6);
guint32 prefix;
int pos = 0;
diff --git a/epan/ftypes/ftype-string.c b/epan/ftypes/ftype-string.c
index 1ecea3bf09..919cc2eef1 100644
--- a/epan/ftypes/ftype-string.c
+++ b/epan/ftypes/ftype-string.c
@@ -191,43 +191,43 @@ slice(fvalue_t *fv, GByteArray *bytes, guint offset, guint length)
static gboolean
-cmp_eq(fvalue_t *a, fvalue_t *b)
+cmp_eq(const fvalue_t *a, const fvalue_t *b)
{
return (strcmp(a->value.string, b->value.string) == 0);
}
static gboolean
-cmp_ne(fvalue_t *a, fvalue_t *b)
+cmp_ne(const fvalue_t *a, const fvalue_t *b)
{
return (strcmp(a->value.string, b->value.string) != 0);
}
static gboolean
-cmp_gt(fvalue_t *a, fvalue_t *b)
+cmp_gt(const fvalue_t *a, const fvalue_t *b)
{
return (strcmp(a->value.string, b->value.string) > 0);
}
static gboolean
-cmp_ge(fvalue_t *a, fvalue_t *b)
+cmp_ge(const fvalue_t *a, const fvalue_t *b)
{
return (strcmp(a->value.string, b->value.string) >= 0);
}
static gboolean
-cmp_lt(fvalue_t *a, fvalue_t *b)
+cmp_lt(const fvalue_t *a, const fvalue_t *b)
{
return (strcmp(a->value.string, b->value.string) < 0);
}
static gboolean
-cmp_le(fvalue_t *a, fvalue_t *b)
+cmp_le(const fvalue_t *a, const fvalue_t *b)
{
return (strcmp(a->value.string, b->value.string) <= 0);
}
static gboolean
-cmp_contains(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_contains(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
/* According to
* http://www.introl.com/introl-demo/Libraries/C/ANSI_C/string/strstr.html
@@ -246,7 +246,7 @@ cmp_contains(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_matches(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_matches(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
char *str = fv_a->value.string;
GRegex *regex = fv_b->value.re;
diff --git a/epan/ftypes/ftype-time.c b/epan/ftypes/ftype-time.c
index b04229807e..9a27c54e73 100644
--- a/epan/ftypes/ftype-time.c
+++ b/epan/ftypes/ftype-time.c
@@ -44,19 +44,19 @@
#endif
static gboolean
-cmp_eq(fvalue_t *a, fvalue_t *b)
+cmp_eq(const fvalue_t *a, const fvalue_t *b)
{
return ((a->value.time.secs) ==(b->value.time.secs))
&&((a->value.time.nsecs)==(b->value.time.nsecs));
}
static gboolean
-cmp_ne(fvalue_t *a, fvalue_t *b)
+cmp_ne(const fvalue_t *a, const fvalue_t *b)
{
return (a->value.time.secs !=b->value.time.secs)
||(a->value.time.nsecs!=b->value.time.nsecs);
}
static gboolean
-cmp_gt(fvalue_t *a, fvalue_t *b)
+cmp_gt(const fvalue_t *a, const fvalue_t *b)
{
if (a->value.time.secs > b->value.time.secs) {
return TRUE;
@@ -68,7 +68,7 @@ cmp_gt(fvalue_t *a, fvalue_t *b)
return a->value.time.nsecs > b->value.time.nsecs;
}
static gboolean
-cmp_ge(fvalue_t *a, fvalue_t *b)
+cmp_ge(const fvalue_t *a, const fvalue_t *b)
{
if (a->value.time.secs > b->value.time.secs) {
return TRUE;
@@ -80,7 +80,7 @@ cmp_ge(fvalue_t *a, fvalue_t *b)
return a->value.time.nsecs >= b->value.time.nsecs;
}
static gboolean
-cmp_lt(fvalue_t *a, fvalue_t *b)
+cmp_lt(const fvalue_t *a, const fvalue_t *b)
{
if (a->value.time.secs < b->value.time.secs) {
return TRUE;
@@ -92,7 +92,7 @@ cmp_lt(fvalue_t *a, fvalue_t *b)
return a->value.time.nsecs < b->value.time.nsecs;
}
static gboolean
-cmp_le(fvalue_t *a, fvalue_t *b)
+cmp_le(const fvalue_t *a, const fvalue_t *b)
{
if (a->value.time.secs < b->value.time.secs) {
return TRUE;
diff --git a/epan/ftypes/ftype-tvbuff.c b/epan/ftypes/ftype-tvbuff.c
index eae3f3b59c..ea734c6580 100644
--- a/epan/ftypes/ftype-tvbuff.c
+++ b/epan/ftypes/ftype-tvbuff.c
@@ -213,7 +213,7 @@ slice(fvalue_t *fv, GByteArray *bytes, guint offset, guint length)
}
static gboolean
-cmp_eq(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_eq(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
tvbuff_t *a = fv_a->value.tvb;
tvbuff_t *b = fv_b->value.tvb;
@@ -234,7 +234,7 @@ cmp_eq(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_ne(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_ne(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
tvbuff_t *a = fv_a->value.tvb;
tvbuff_t *b = fv_b->value.tvb;
@@ -256,7 +256,7 @@ cmp_ne(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_gt(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_gt(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
tvbuff_t *a = fv_a->value.tvb;
tvbuff_t *b = fv_b->value.tvb;
@@ -281,7 +281,7 @@ cmp_gt(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_ge(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_ge(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
tvbuff_t *a = fv_a->value.tvb;
tvbuff_t *b = fv_b->value.tvb;
@@ -306,7 +306,7 @@ cmp_ge(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_lt(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_lt(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
tvbuff_t *a = fv_a->value.tvb;
tvbuff_t *b = fv_b->value.tvb;
@@ -331,7 +331,7 @@ cmp_lt(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_le(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_le(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
tvbuff_t *a = fv_a->value.tvb;
tvbuff_t *b = fv_b->value.tvb;
@@ -356,7 +356,7 @@ cmp_le(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_contains(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_contains(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
volatile gboolean contains = FALSE;
@@ -374,7 +374,7 @@ cmp_contains(fvalue_t *fv_a, fvalue_t *fv_b)
}
static gboolean
-cmp_matches(fvalue_t *fv_a, fvalue_t *fv_b)
+cmp_matches(const fvalue_t *fv_a, const fvalue_t *fv_b)
{
tvbuff_t *tvb = fv_a->value.tvb;
GRegex *regex = fv_b->value.re;
diff --git a/epan/ftypes/ftypes.c b/epan/ftypes/ftypes.c
index 7451d2af1c..7005e611ba 100644
--- a/epan/ftypes/ftypes.c
+++ b/epan/ftypes/ftypes.c
@@ -489,7 +489,7 @@ fvalue_get_floating(fvalue_t *fv)
}
gboolean
-fvalue_eq(fvalue_t *a, fvalue_t *b)
+fvalue_eq(const fvalue_t *a, const fvalue_t *b)
{
/* XXX - check compatibility of a and b */
g_assert(a->ftype->cmp_eq);
@@ -497,7 +497,7 @@ fvalue_eq(fvalue_t *a, fvalue_t *b)
}
gboolean
-fvalue_ne(fvalue_t *a, fvalue_t *b)
+fvalue_ne(const fvalue_t *a, const fvalue_t *b)
{
/* XXX - check compatibility of a and b */
g_assert(a->ftype->cmp_ne);
@@ -505,7 +505,7 @@ fvalue_ne(fvalue_t *a, fvalue_t *b)
}
gboolean
-fvalue_gt(fvalue_t *a, fvalue_t *b)
+fvalue_gt(const fvalue_t *a, const fvalue_t *b)
{
/* XXX - check compatibility of a and b */
g_assert(a->ftype->cmp_gt);
@@ -513,7 +513,7 @@ fvalue_gt(fvalue_t *a, fvalue_t *b)
}
gboolean
-fvalue_ge(fvalue_t *a, fvalue_t *b)
+fvalue_ge(const fvalue_t *a, const fvalue_t *b)
{
/* XXX - check compatibility of a and b */
g_assert(a->ftype->cmp_ge);
@@ -521,7 +521,7 @@ fvalue_ge(fvalue_t *a, fvalue_t *b)
}
gboolean
-fvalue_lt(fvalue_t *a, fvalue_t *b)
+fvalue_lt(const fvalue_t *a, const fvalue_t *b)
{
/* XXX - check compatibility of a and b */
g_assert(a->ftype->cmp_lt);
@@ -529,7 +529,7 @@ fvalue_lt(fvalue_t *a, fvalue_t *b)
}
gboolean
-fvalue_le(fvalue_t *a, fvalue_t *b)
+fvalue_le(const fvalue_t *a, const fvalue_t *b)
{
/* XXX - check compatibility of a and b */
g_assert(a->ftype->cmp_le);
@@ -537,7 +537,7 @@ fvalue_le(fvalue_t *a, fvalue_t *b)
}
gboolean
-fvalue_bitwise_and(fvalue_t *a, fvalue_t *b)
+fvalue_bitwise_and(const fvalue_t *a, const fvalue_t *b)
{
/* XXX - check compatibility of a and b */
g_assert(a->ftype->cmp_bitwise_and);
@@ -545,7 +545,7 @@ fvalue_bitwise_and(fvalue_t *a, fvalue_t *b)
}
gboolean
-fvalue_contains(fvalue_t *a, fvalue_t *b)
+fvalue_contains(const fvalue_t *a, const fvalue_t *b)
{
/* XXX - check compatibility of a and b */
g_assert(a->ftype->cmp_contains);
@@ -553,7 +553,7 @@ fvalue_contains(fvalue_t *a, fvalue_t *b)
}
gboolean
-fvalue_matches(fvalue_t *a, fvalue_t *b)
+fvalue_matches(const fvalue_t *a, const fvalue_t *b)
{
/* XXX - check compatibility of a and b */
g_assert(a->ftype->cmp_matches);
diff --git a/epan/ftypes/ftypes.h b/epan/ftypes/ftypes.h
index e8ddc59740..7d58b66f9b 100644
--- a/epan/ftypes/ftypes.h
+++ b/epan/ftypes/ftypes.h
@@ -202,7 +202,7 @@ typedef gint32 (*FvalueGetSignedIntegerFunc)(fvalue_t*);
typedef guint64 (*FvalueGetInteger64Func)(fvalue_t*);
typedef double (*FvalueGetFloatingFunc)(fvalue_t*);
-typedef gboolean (*FvalueCmp)(fvalue_t*, fvalue_t*);
+typedef gboolean (*FvalueCmp)(const fvalue_t*, const fvalue_t*);
typedef guint (*FvalueLen)(fvalue_t*);
typedef void (*FvalueSlice)(fvalue_t*, GByteArray *, guint offset, guint length);
@@ -341,31 +341,31 @@ extern double
fvalue_get_floating(fvalue_t *fv);
gboolean
-fvalue_eq(fvalue_t *a, fvalue_t *b);
+fvalue_eq(const fvalue_t *a, const fvalue_t *b);
gboolean
-fvalue_ne(fvalue_t *a, fvalue_t *b);
+fvalue_ne(const fvalue_t *a, const fvalue_t *b);
gboolean
-fvalue_gt(fvalue_t *a, fvalue_t *b);
+fvalue_gt(const fvalue_t *a, const fvalue_t *b);
gboolean
-fvalue_ge(fvalue_t *a, fvalue_t *b);
+fvalue_ge(const fvalue_t *a, const fvalue_t *b);
gboolean
-fvalue_lt(fvalue_t *a, fvalue_t *b);
+fvalue_lt(const fvalue_t *a, const fvalue_t *b);
gboolean
-fvalue_le(fvalue_t *a, fvalue_t *b);
+fvalue_le(const fvalue_t *a, const fvalue_t *b);
gboolean
-fvalue_bitwise_and(fvalue_t *a, fvalue_t *b);
+fvalue_bitwise_and(const fvalue_t *a, const fvalue_t *b);
gboolean
-fvalue_contains(fvalue_t *a, fvalue_t *b);
+fvalue_contains(const fvalue_t *a, const fvalue_t *b);
gboolean
-fvalue_matches(fvalue_t *a, fvalue_t *b);
+fvalue_matches(const fvalue_t *a, const fvalue_t *b);
guint
fvalue_length(fvalue_t *fv);