From Evan Huus: Use Add DISSECTOR_ASSERT_HINT() macro. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7142
svn path=/trunk/; revision=42148
This commit is contained in:
parent
bb36edf54e
commit
b02b6a932f
|
@ -2977,7 +2977,7 @@ cigi2_add_tree(tvbuff_t *tvb, proto_tree *cigi_tree)
|
|||
}
|
||||
|
||||
/* Does the packet offset match the supposed length of the packet? */
|
||||
DISSECTOR_ASSERT((offset - init_offset == packet_length) && "Packet offset does not match packet length");
|
||||
DISSECTOR_ASSERT_HINT(offset - init_offset == packet_length, "Packet offset does not match packet length");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3371,7 +3371,7 @@ cigi3_add_tree(tvbuff_t *tvb, proto_tree *cigi_tree)
|
|||
}
|
||||
|
||||
/* Does the packet offset match the supposed length of the packet? */
|
||||
DISSECTOR_ASSERT((offset - init_offset == packet_length) && "Packet offset does not match packet length");
|
||||
DISSECTOR_ASSERT_HINT(offset - init_offset == packet_length, "Packet offset does not match packet length");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2568,7 +2568,7 @@ proto_item_append_string(proto_item *pi, const char *str)
|
|||
return;
|
||||
|
||||
fi = PITEM_FINFO(pi);
|
||||
DISSECTOR_ASSERT(fi && "proto_tree_set_visible(tree, TRUE) should have been called previously");
|
||||
DISSECTOR_ASSERT_HINT(fi, "proto_tree_set_visible(tree, TRUE) should have been called previously");
|
||||
|
||||
hfinfo = fi->hfinfo;
|
||||
if (hfinfo->type == FT_PROTOCOL) {
|
||||
|
|
|
@ -189,10 +189,10 @@ tvb_free_chain(tvbuff_t* tvb)
|
|||
{
|
||||
tvbuff_t *next_tvb;
|
||||
DISSECTOR_ASSERT(tvb);
|
||||
DISSECTOR_ASSERT((tvb->previous==NULL) && "tvb_free_chain(): tvb must be initial tvb in chain");
|
||||
DISSECTOR_ASSERT_HINT(tvb->previous==NULL, "tvb_free_chain(): tvb must be initial tvb in chain");
|
||||
while (tvb) {
|
||||
next_tvb=tvb->next;
|
||||
DISSECTOR_ASSERT(((next_tvb==NULL) || (tvb==next_tvb->previous)) && "tvb_free_chain(): corrupt tvb chain ?");
|
||||
DISSECTOR_ASSERT_HINT((next_tvb==NULL) || (tvb==next_tvb->previous), "tvb_free_chain(): corrupt tvb chain ?");
|
||||
tvb_free_internal(tvb);
|
||||
tvb = next_tvb;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue