aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dfilter/dfvm.c26
-rw-r--r--epan/dfilter/dfvm.h3
-rw-r--r--epan/dfilter/gencode.c4
-rw-r--r--epan/dfilter/semcheck.c2
-rw-r--r--epan/ftypes/ftype-bytes.c26
-rw-r--r--epan/ftypes/ftype-double.c10
-rw-r--r--epan/ftypes/ftype-ieee-11073-float.c12
-rw-r--r--epan/ftypes/ftype-integer.c58
-rw-r--r--epan/ftypes/ftype-ipv4.c6
-rw-r--r--epan/ftypes/ftype-ipv6.c4
-rw-r--r--epan/ftypes/ftype-none.c2
-rw-r--r--epan/ftypes/ftype-protocol.c6
-rw-r--r--epan/ftypes/ftype-string.c14
-rw-r--r--epan/ftypes/ftype-time.c8
-rw-r--r--epan/ftypes/ftypes-int.h4
-rw-r--r--epan/ftypes/ftypes.c8
-rw-r--r--epan/ftypes/ftypes.h4
-rw-r--r--packaging/debian/libwireshark0.symbols2
18 files changed, 106 insertions, 93 deletions
diff --git a/epan/dfilter/dfvm.c b/epan/dfilter/dfvm.c
index a7b47da0c2..3ff5dab5b6 100644
--- a/epan/dfilter/dfvm.c
+++ b/epan/dfilter/dfvm.c
@@ -277,8 +277,13 @@ dfvm_dump(FILE *f, dfilter_t *df)
id, arg1_str, arg2_str, arg3_str);
break;
- case ANY_NOTZERO:
- fprintf(f, "%05d ANY_NOTZERO\t%s\n",
+ case ANY_ZERO:
+ fprintf(f, "%05d ANY_ZERO\t\t%s\n",
+ id, arg1_str);
+ break;
+
+ case ALL_ZERO:
+ fprintf(f, "%05d ALL_ZERO\t\t%s\n",
id, arg1_str);
break;
@@ -440,7 +445,6 @@ cmp_test_unary(enum match_how how, DFVMTestFunc test_func, GSList *arg1)
return want_all;
}
-/* cmp(A) <=> cmp(a1) OR cmp(a2) OR cmp(a3) OR ... */
static gboolean
any_test_unary(dfilter_t *df, DFVMTestFunc func, dfvm_value_t *arg1)
{
@@ -449,6 +453,14 @@ any_test_unary(dfilter_t *df, DFVMTestFunc func, dfvm_value_t *arg1)
return cmp_test_unary(MATCH_ANY, func, list1);
}
+static gboolean
+all_test_unary(dfilter_t *df, DFVMTestFunc func, dfvm_value_t *arg1)
+{
+ ws_assert(arg1->type == REGISTER);
+ GSList *list1 = df->registers[arg1->value.numeric];
+ return cmp_test_unary(MATCH_ALL, func, list1);
+}
+
/* cmp(A) <=> cmp(a1) OR cmp(a2) OR cmp(a3) OR ... */
static gboolean
any_test(dfilter_t *df, DFVMCompareFunc cmp,
@@ -760,8 +772,12 @@ dfvm_apply(dfilter_t *df, proto_tree *tree)
mk_bitwise(df, fvalue_bitwise_and, arg1, arg2, arg3);
break;
- case ANY_NOTZERO:
- accum = any_test_unary(df, fvalue_is_true, arg1);
+ case ANY_ZERO:
+ accum = any_test_unary(df, fvalue_is_zero, arg1);
+ break;
+
+ case ALL_ZERO:
+ accum = all_test_unary(df, fvalue_is_zero, arg1);
break;
case ANY_CONTAINS:
diff --git a/epan/dfilter/dfvm.h b/epan/dfilter/dfvm.h
index 47b0caec7c..0738474ce4 100644
--- a/epan/dfilter/dfvm.h
+++ b/epan/dfilter/dfvm.h
@@ -61,9 +61,10 @@ typedef enum {
ANY_GE,
ANY_LT,
ANY_LE,
+ ANY_ZERO,
+ ALL_ZERO,
ANY_CONTAINS,
ANY_MATCHES,
- ANY_NOTZERO,
MK_RANGE,
MK_BITWISE_AND,
CALL_FUNCTION,
diff --git a/epan/dfilter/gencode.c b/epan/dfilter/gencode.c
index 3c8806dcb8..4ddcdfaab0 100644
--- a/epan/dfilter/gencode.c
+++ b/epan/dfilter/gencode.c
@@ -392,9 +392,11 @@ gen_test(dfwork_t *dfw, stnode_t *st_node)
case TEST_OP_NOTZERO:
val1 = gen_entity(dfw, st_arg1, &jumps);
- insn = dfvm_insn_new(ANY_NOTZERO);
+ insn = dfvm_insn_new(ALL_ZERO);
insn->arg1 = dfvm_value_ref(val1);
dfw_append_insn(dfw, insn);
+ insn = dfvm_insn_new(NOT);
+ dfw_append_insn(dfw, insn);
g_slist_foreach(jumps, fixup_jumps, dfw);
g_slist_free(jumps);
jumps = NULL;
diff --git a/epan/dfilter/semcheck.c b/epan/dfilter/semcheck.c
index b06d06791e..21075cf24f 100644
--- a/epan/dfilter/semcheck.c
+++ b/epan/dfilter/semcheck.c
@@ -1249,7 +1249,7 @@ check_bitwise_operation(dfwork_t *dfw, stnode_t *st_node)
ftype1 = check_bitwise_entity(dfw, st_node, st_arg1, FT_NONE);
ftype2 = check_bitwise_entity(dfw, st_node, st_arg2, ftype1);
- if (!ftype_can_is_true(ftype1)) {
+ if (!ftype_can_is_zero(ftype1)) {
FAIL(dfw, "Cannot test if %s is true", stnode_todisplay(st_arg1));
}
diff --git a/epan/ftypes/ftype-bytes.c b/epan/ftypes/ftype-bytes.c
index 974c2d580b..a7a9362a4f 100644
--- a/epan/ftypes/ftype-bytes.c
+++ b/epan/ftypes/ftype-bytes.c
@@ -563,19 +563,19 @@ cmp_matches(const fvalue_t *fv, const ws_regex_t *regex)
}
static gboolean
-bytes_is_true(const fvalue_t *fv_a)
+bytes_is_zero(const fvalue_t *fv_a)
{
GByteArray *a = fv_a->value.bytes;
if (a->len == 0)
- return FALSE;
+ return TRUE;
for (guint i = 0; i < a->len; i++) {
if (a->data[i] != 0) {
- return TRUE;
+ return FALSE;
}
}
- return FALSE;
+ return TRUE;
}
void
@@ -601,7 +601,7 @@ ftype_register_bytes(void)
cmp_contains,
cmp_matches,
- bytes_is_true, /* is_true */
+ bytes_is_zero, /* is_zero */
len,
slice,
bytes_bitwise_and, /* bitwise_and */
@@ -626,7 +626,7 @@ ftype_register_bytes(void)
cmp_contains,
NULL, /* cmp_matches */
- bytes_is_true, /* is_true */
+ bytes_is_zero, /* is_zero */
len,
slice,
bytes_bitwise_and, /* bitwise_and */
@@ -651,7 +651,7 @@ ftype_register_bytes(void)
cmp_contains,
cmp_matches,
- bytes_is_true, /* is_true */
+ bytes_is_zero, /* is_zero */
len,
slice,
bytes_bitwise_and, /* bitwise_and */
@@ -676,7 +676,7 @@ ftype_register_bytes(void)
cmp_contains,
cmp_matches,
- bytes_is_true, /* is_true */
+ bytes_is_zero, /* is_zero */
len,
slice,
bytes_bitwise_and, /* bitwise_and */
@@ -701,7 +701,7 @@ ftype_register_bytes(void)
cmp_contains,
cmp_matches,
- bytes_is_true, /* is_true */
+ bytes_is_zero, /* is_zero */
len,
slice,
bytes_bitwise_and, /* bitwise_and */
@@ -726,7 +726,7 @@ ftype_register_bytes(void)
cmp_contains,
NULL, /* cmp_matches */
- bytes_is_true, /* is_true */
+ bytes_is_zero, /* is_zero */
len,
slice,
bytes_bitwise_and, /* bitwise_and */
@@ -751,7 +751,7 @@ ftype_register_bytes(void)
cmp_contains,
NULL, /* cmp_matches */
- bytes_is_true, /* is_true */
+ bytes_is_zero, /* is_zero */
len,
slice,
bytes_bitwise_and, /* bitwise_and */
@@ -776,7 +776,7 @@ ftype_register_bytes(void)
cmp_contains,
NULL, /* cmp_matches */
- bytes_is_true, /* is_true */
+ bytes_is_zero, /* is_zero */
len,
slice,
bytes_bitwise_and, /* bitwise_and */
@@ -801,7 +801,7 @@ ftype_register_bytes(void)
cmp_contains,
cmp_matches,
- bytes_is_true, /* is_true */
+ bytes_is_zero, /* is_zero */
len,
slice,
bytes_bitwise_and, /* bitwise_and */
diff --git a/epan/ftypes/ftype-double.c b/epan/ftypes/ftype-double.c
index e97f9e34fb..2dcaaafa62 100644
--- a/epan/ftypes/ftype-double.c
+++ b/epan/ftypes/ftype-double.c
@@ -85,12 +85,6 @@ double_val_to_repr(wmem_allocator_t *scope, const fvalue_t *fv, ftrepr_t rtype _
return buf;
}
-static gboolean
-double_is_true(const fvalue_t *fv)
-{
- return fv->value.floating != 0.0;
-}
-
static int
cmp_order(const fvalue_t *a, const fvalue_t *b)
{
@@ -124,7 +118,7 @@ ftype_register_double(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- double_is_true, /* is_true */
+ NULL, /* is_zero */
NULL,
NULL,
NULL, /* bitwise_and */
@@ -149,7 +143,7 @@ ftype_register_double(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- double_is_true, /* is_true */
+ NULL, /* is_zero */
NULL,
NULL,
NULL, /* bitwise_and */
diff --git a/epan/ftypes/ftype-ieee-11073-float.c b/epan/ftypes/ftype-ieee-11073-float.c
index 26719586c1..a1ba68adb2 100644
--- a/epan/ftypes/ftype-ieee-11073-float.c
+++ b/epan/ftypes/ftype-ieee-11073-float.c
@@ -453,9 +453,9 @@ sfloat_ieee_11073_cmp_order(const fvalue_t *a, const fvalue_t *b)
}
static gboolean
-sfloat_ieee_11073_is_true(const fvalue_t *a)
+sfloat_ieee_11073_is_zero(const fvalue_t *a)
{
- return a->value.sfloat_ieee_11073 != 0;
+ return a->value.sfloat_ieee_11073 == 0;
}
/*============================================================================*/
@@ -862,9 +862,9 @@ float_ieee_11073_cmp_order(const fvalue_t *a, const fvalue_t *b)
}
static gboolean
-float_ieee_11073_is_true(const fvalue_t *a)
+float_ieee_11073_is_zero(const fvalue_t *a)
{
- return a->value.float_ieee_11073 != 0;
+ return a->value.float_ieee_11073 == 0;
}
/*============================================================================*/
@@ -917,7 +917,7 @@ Example: 114 is 0x0072
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- sfloat_ieee_11073_is_true, /* is_true */
+ sfloat_ieee_11073_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
NULL, /* bitwise_and */
@@ -969,7 +969,7 @@ Example: 36.4 is 0xFF00016C
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- float_ieee_11073_is_true, /* is_true */
+ float_ieee_11073_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
NULL, /* bitwise_and */
diff --git a/epan/ftypes/ftype-integer.c b/epan/ftypes/ftype-integer.c
index 59d8435836..faa0f8e155 100644
--- a/epan/ftypes/ftype-integer.c
+++ b/epan/ftypes/ftype-integer.c
@@ -748,9 +748,9 @@ uint_bitwise_and(fvalue_t *dst, const fvalue_t *a, const fvalue_t *b, char **err
}
gboolean
-uint_is_true(const fvalue_t *fv)
+uint_is_zero(const fvalue_t *fv)
{
- return fv->value.uinteger != 0;
+ return fv->value.uinteger == 0;
}
enum ft_result
@@ -761,9 +761,9 @@ uint64_bitwise_and(fvalue_t *dst, const fvalue_t *a, const fvalue_t *b, char **e
}
gboolean
-uint64_is_true(const fvalue_t *fv)
+uint64_is_zero(const fvalue_t *fv)
{
- return fv->value.uinteger64 != 0;
+ return fv->value.uinteger64 == 0;
}
enum ft_result
@@ -774,9 +774,9 @@ sint_bitwise_and(fvalue_t *dst, const fvalue_t *a, const fvalue_t *b, char **err
}
gboolean
-sint_is_true(const fvalue_t *fv)
+sint_is_zero(const fvalue_t *fv)
{
- return fv->value.sinteger != 0;
+ return fv->value.sinteger == 0;
}
enum ft_result
@@ -787,9 +787,9 @@ sint64_bitwise_and(fvalue_t *dst, const fvalue_t *a, const fvalue_t *b, char **e
}
gboolean
-sint64_is_true(const fvalue_t *fv)
+sint64_is_zero(const fvalue_t *fv)
{
- return fv->value.sinteger64 != 0;
+ return fv->value.sinteger64 == 0;
}
/* BOOLEAN-specific */
@@ -912,7 +912,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- uint_is_true, /* is_true */
+ uint_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
uint_bitwise_and, /* bitwise_and */
@@ -936,7 +936,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- uint_is_true, /* is_true */
+ uint_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
uint_bitwise_and, /* bitwise_and */
@@ -960,7 +960,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- uint_is_true, /* is_true */
+ uint_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
uint_bitwise_and, /* bitwise_and */
@@ -984,7 +984,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- uint_is_true, /* is_true */
+ uint_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
uint_bitwise_and, /* bitwise_and */
@@ -1008,7 +1008,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- uint_is_true, /* is_true */
+ uint_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
uint_bitwise_and, /* bitwise_and */
@@ -1032,7 +1032,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- uint64_is_true, /* is_true */
+ uint64_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
uint64_bitwise_and, /* bitwise_and */
@@ -1056,7 +1056,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- uint64_is_true, /* is_true */
+ uint64_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
uint64_bitwise_and, /* bitwise_and */
@@ -1080,7 +1080,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- uint64_is_true, /* is_true */
+ uint64_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
uint64_bitwise_and, /* bitwise_and */
@@ -1104,7 +1104,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- uint64_is_true, /* is_true */
+ uint64_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
uint64_bitwise_and, /* bitwise_and */
@@ -1128,7 +1128,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- sint_is_true, /* is_true */
+ sint_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
sint_bitwise_and, /* bitwise_and */
@@ -1152,7 +1152,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- sint_is_true, /* is_true */
+ sint_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
sint_bitwise_and, /* bitwise_and */
@@ -1176,7 +1176,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- sint_is_true, /* is_true */
+ sint_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
sint_bitwise_and, /* bitwise_and */
@@ -1200,7 +1200,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- sint_is_true, /* is_true */
+ sint_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
sint_bitwise_and, /* bitwise_and */
@@ -1224,7 +1224,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- sint64_is_true, /* is_true */
+ sint64_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
sint64_bitwise_and, /* bitwise_and */
@@ -1248,7 +1248,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- sint64_is_true, /* is_true */
+ sint64_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
sint64_bitwise_and, /* bitwise_and */
@@ -1272,7 +1272,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- sint64_is_true, /* is_true */
+ sint64_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
sint64_bitwise_and, /* bitwise_and */
@@ -1296,7 +1296,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- sint64_is_true, /* is_true */
+ sint64_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
sint64_bitwise_and, /* bitwise_and */
@@ -1320,7 +1320,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- uint64_is_true, /* is_true */
+ uint64_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
NULL, /* bitwise_and */
@@ -1345,7 +1345,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- uint_is_true, /* is_true */
+ uint_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
uint_bitwise_and, /* bitwise_and */
@@ -1370,7 +1370,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- uint_is_true, /* is_true */
+ uint_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
uint_bitwise_and, /* bitwise_and */
@@ -1395,7 +1395,7 @@ ftype_register_integers(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- uint64_is_true, /* is_true */
+ uint64_is_zero, /* is_zero */
NULL, /* len */
NULL, /* slice */
uint64_bitwise_and, /* bitwise_and */
diff --git a/epan/ftypes/ftype-ipv4.c b/epan/ftypes/ftype-ipv4.c
index 708989efce..d3cf02a947 100644
--- a/epan/ftypes/ftype-ipv4.c
+++ b/epan/ftypes/ftype-ipv4.c
@@ -140,9 +140,9 @@ slice(fvalue_t *fv, GByteArray *bytes, guint offset, guint length)
}
static gboolean
-is_true(const fvalue_t *fv_a)
+is_zero(const fvalue_t *fv_a)
{
- return fv_a->value.ipv4.addr != 0;
+ return fv_a->value.ipv4.addr == 0;
}
void
@@ -168,7 +168,7 @@ ftype_register_ipv4(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- is_true,
+ is_zero,
NULL,
slice,
bitwise_and,
diff --git a/epan/ftypes/ftype-ipv6.c b/epan/ftypes/ftype-ipv6.c
index 34bfdddd1b..dc69d22899 100644
--- a/epan/ftypes/ftype-ipv6.c
+++ b/epan/ftypes/ftype-ipv6.c
@@ -162,7 +162,7 @@ slice(fvalue_t *fv, GByteArray *bytes, guint offset, guint length)
}
static gboolean
-is_true(const fvalue_t *fv_a)
+is_zero(const fvalue_t *fv_a)
{
ws_in6_addr zero = { 0 };
return memcmp(&fv_a->value.ipv6.addr, &zero, sizeof(ws_in6_addr)) == 0;
@@ -190,7 +190,7 @@ ftype_register_ipv6(void)
NULL, /* XXX, cmp_contains, needed? ipv4 doesn't support it */
NULL, /* cmp_matches */
- is_true,
+ is_zero,
NULL,
slice,
bitwise_and,
diff --git a/epan/ftypes/ftype-none.c b/epan/ftypes/ftype-none.c
index 3cdefa44f0..56da4cb2a1 100644
--- a/epan/ftypes/ftype-none.c
+++ b/epan/ftypes/ftype-none.c
@@ -34,7 +34,7 @@ ftype_register_none(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- NULL, /* is_true */
+ NULL, /* is_zero */
NULL, /* len */
NULL, /* slice */
NULL, /* biwise_and */
diff --git a/epan/ftypes/ftype-protocol.c b/epan/ftypes/ftype-protocol.c
index 133741f7e8..e7da850576 100644
--- a/epan/ftypes/ftype-protocol.c
+++ b/epan/ftypes/ftype-protocol.c
@@ -300,10 +300,10 @@ cmp_matches(const fvalue_t *fv, const ws_regex_t *regex)
}
static gboolean
-is_true(const fvalue_t *fv)
+is_zero(const fvalue_t *fv)
{
const protocol_value_t *a = &fv->value.protocol;
- return a->tvb != NULL || a->proto_string != NULL;
+ return a->tvb == NULL && a->proto_string == NULL;
}
void
@@ -329,7 +329,7 @@ ftype_register_tvbuff(void)
cmp_contains,
cmp_matches,
- is_true,
+ is_zero,
len,
slice,
NULL,
diff --git a/epan/ftypes/ftype-string.c b/epan/ftypes/ftype-string.c
index e115211da6..0563ce03bb 100644
--- a/epan/ftypes/ftype-string.c
+++ b/epan/ftypes/ftype-string.c
@@ -102,9 +102,9 @@ val_from_charconst(fvalue_t *fv, unsigned long num, gchar **err_msg)
}
static gboolean
-string_is_true(const fvalue_t *fv)
+string_is_zero(const fvalue_t *fv)
{
- return fv->value.string != NULL && *(fv->value.string) != 0;
+ return fv->value.string == NULL || strlen(fv->value.string) == 0;
}
static guint
@@ -182,7 +182,7 @@ ftype_register_string(void)
cmp_contains,
cmp_matches,
- string_is_true, /* is_true */
+ string_is_zero, /* is_zero */
len,
slice,
NULL, /* bitwise_and */
@@ -206,7 +206,7 @@ ftype_register_string(void)
cmp_contains, /* cmp_contains */
cmp_matches,
- string_is_true, /* is_true */
+ string_is_zero, /* is_zero */
len,
slice,
NULL, /* bitwise_and */
@@ -230,7 +230,7 @@ ftype_register_string(void)
cmp_contains, /* cmp_contains */
cmp_matches,
- string_is_true, /* is_true */
+ string_is_zero, /* is_zero */
len,
slice,
NULL, /* bitwise_and */
@@ -254,7 +254,7 @@ ftype_register_string(void)
cmp_contains, /* cmp_contains */
cmp_matches,
- string_is_true, /* is_true */
+ string_is_zero, /* is_zero */
len,
slice,
NULL, /* bitwise_and */
@@ -278,7 +278,7 @@ ftype_register_string(void)
cmp_contains, /* cmp_contains */
cmp_matches,
- string_is_true, /* is_true */
+ string_is_zero, /* is_zero */
len,
slice,
NULL, /* bitwise_and */
diff --git a/epan/ftypes/ftype-time.c b/epan/ftypes/ftype-time.c
index bbb6d6b408..c3848e99b8 100644
--- a/epan/ftypes/ftype-time.c
+++ b/epan/ftypes/ftype-time.c
@@ -406,9 +406,9 @@ relative_val_to_repr(wmem_allocator_t *scope, const fvalue_t *fv, ftrepr_t rtype
}
static gboolean
-time_is_true(const fvalue_t *fv)
+time_is_zero(const fvalue_t *fv)
{
- return !nstime_is_zero(&fv->value.time);
+ return nstime_is_zero(&fv->value.time);
}
void
@@ -434,7 +434,7 @@ ftype_register_time(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- time_is_true, /* is_true */
+ time_is_zero, /* is_zero */
NULL,
NULL,
NULL, /* bitwise_and */
@@ -458,7 +458,7 @@ ftype_register_time(void)
NULL, /* cmp_contains */
NULL, /* cmp_matches */
- time_is_true, /* is_true */
+ time_is_zero, /* is_zero */
NULL,
NULL,
NULL, /* bitwise_and */
diff --git a/epan/ftypes/ftypes-int.h b/epan/ftypes/ftypes-int.h
index 1dcae728c4..eba613e0c9 100644
--- a/epan/ftypes/ftypes-int.h
+++ b/epan/ftypes/ftypes-int.h
@@ -49,7 +49,7 @@ typedef int (*FvalueCmp)(const fvalue_t*, const fvalue_t*);
typedef gboolean (*FvalueContains)(const fvalue_t*, const fvalue_t*);
typedef gboolean (*FvalueMatches)(const fvalue_t*, const ws_regex_t*);
-typedef gboolean (*FvalueIsTrue)(const fvalue_t*);
+typedef gboolean (*FvalueIsZero)(const fvalue_t*);
typedef guint (*FvalueLen)(fvalue_t*);
typedef void (*FvalueSlice)(fvalue_t*, GByteArray *, guint offset, guint length);
typedef enum ft_result (*FvalueBitwiseAnd)(fvalue_t *, const fvalue_t*, const fvalue_t*, gchar **);
@@ -93,7 +93,7 @@ struct _ftype_t {
FvalueContains cmp_contains;
FvalueMatches cmp_matches;
- FvalueIsTrue is_true;
+ FvalueIsZero is_zero;
FvalueLen len;
FvalueSlice slice;
FvalueBitwiseAnd bitwise_and;
diff --git a/epan/ftypes/ftypes.c b/epan/ftypes/ftypes.c
index c7a86a53cc..6619e0e5cd 100644
--- a/epan/ftypes/ftypes.c
+++ b/epan/ftypes/ftypes.c
@@ -211,12 +211,12 @@ ftype_can_matches(enum ftenum ftype)
}
gboolean
-ftype_can_is_true(enum ftenum ftype)
+ftype_can_is_zero(enum ftenum ftype)
{
ftype_t *ft;
FTYPE_LOOKUP(ftype, ft);
- return ft->is_true ? TRUE : FALSE;
+ return ft->is_zero ? TRUE : FALSE;
}
/* ---------------------------------------------------------- */
@@ -754,9 +754,9 @@ fvalue_matches(const fvalue_t *a, const ws_regex_t *re)
}
gboolean
-fvalue_is_true(const fvalue_t *a)
+fvalue_is_zero(const fvalue_t *a)
{
- return a->ftype->is_true(a);
+ return a->ftype->is_zero(a);
}
fvalue_t *
diff --git a/epan/ftypes/ftypes.h b/epan/ftypes/ftypes.h
index de22e7ec8a..aab6e9e3c9 100644
--- a/epan/ftypes/ftypes.h
+++ b/epan/ftypes/ftypes.h
@@ -192,7 +192,7 @@ ftype_can_matches(enum ftenum ftype);
WS_DLL_PUBLIC
gboolean
-ftype_can_is_true(enum ftenum ftype);
+ftype_can_is_zero(enum ftenum ftype);
/* ---------------- FVALUE ----------------- */
@@ -354,7 +354,7 @@ gboolean
fvalue_matches(const fvalue_t *a, const ws_regex_t *re);
gboolean
-fvalue_is_true(const fvalue_t *a);
+fvalue_is_zero(const fvalue_t *a);
guint
fvalue_length(fvalue_t *fv);
diff --git a/packaging/debian/libwireshark0.symbols b/packaging/debian/libwireshark0.symbols
index a4e34d03e5..20854a5d34 100644
--- a/packaging/debian/libwireshark0.symbols
+++ b/packaging/debian/libwireshark0.symbols
@@ -724,7 +724,7 @@ libwireshark.so.0 libwireshark0 #MINVER#
ftype_can_cmp@Base 3.7.0
ftype_can_contains@Base 1.9.1
ftype_can_eq@Base 1.9.1
- ftype_can_is_true@Base 3.7.0
+ ftype_can_is_zero@Base 3.7.0
ftype_can_matches@Base 1.9.1
ftype_can_slice@Base 1.9.1
ftype_name@Base 1.9.1