From f92fab41a5266cb380c443882ce5efd5a7ee3318 Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Tue, 23 Jun 2015 17:22:18 -0700 Subject: Remove a bunch more deprecated tvb_length calls (getting really close!) Change-Id: Ibf22a5f727c4dc0070b78144a4b0ab8e0c5e1bce Reviewed-on: https://code.wireshark.org/review/9081 Reviewed-by: Evan Huus --- epan/dissectors/packet-lapsat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'epan/dissectors/packet-lapsat.c') diff --git a/epan/dissectors/packet-lapsat.c b/epan/dissectors/packet-lapsat.c index 3b0f16b046..5939a0f1fa 100644 --- a/epan/dissectors/packet-lapsat.c +++ b/epan/dissectors/packet-lapsat.c @@ -438,7 +438,7 @@ dissect_lapsat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) unsigned int hlen, is_response = 0, plen; /* Check that there's enough data */ - if (tvb_length(tvb) < LAPSAT_HEADER_LEN) + if (tvb_captured_length(tvb) < LAPSAT_HEADER_LEN) return; /* Set protocol column */ @@ -494,14 +494,14 @@ dissect_lapsat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Get the payload */ plen = (addr & LAPSAT_LFI) ? - tvb_get_guint8(tvb, 3) : tvb_length(tvb) - hlen; + tvb_get_guint8(tvb, 3) : tvb_captured_length(tvb) - hlen; if (!plen) return; /* No point in doing more if there is no payload */ - DISSECTOR_ASSERT((plen + hlen) <= tvb_length(tvb)); + DISSECTOR_ASSERT((plen + hlen) <= tvb_captured_length(tvb)); - if ((plen + hlen) == tvb_length(tvb)) { + if ((plen + hlen) == tvb_captured_length(tvb)) { /* Need to integrate the last nibble */ guint8 *data = (guint8 *)tvb_memdup(NULL, tvb, hlen, plen); data[plen-1] |= tvb_get_guint8(tvb, 2) << 4; -- cgit v1.2.3