No need to call tvb_reported_length() twice.
Just reuse the result we got from an earlier call. Change-Id: Icb4617d731d9e3f152ce762f56a1c32567cbde4a Reviewed-on: https://code.wireshark.org/review/8270 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
4f95ff832e
commit
6e66cdaaed
|
@ -371,7 +371,7 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
|
|||
/*
|
||||
* Other message - checksum the entire packet.
|
||||
*/
|
||||
pim_length = tvb_reported_length(tvb);
|
||||
pim_length = length;
|
||||
}
|
||||
|
||||
if (!pinfo->fragmented && length >= pim_length) {
|
||||
|
@ -850,7 +850,7 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
/*
|
||||
* Other message - checksum the entire packet.
|
||||
*/
|
||||
pim_length = tvb_reported_length(tvb);
|
||||
pim_length = length;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue