diff options
author | Evan Huus <eapache@gmail.com> | 2015-06-23 11:24:48 -0700 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2015-06-23 18:25:52 +0000 |
commit | 8bc294c0d12e742d8c539177a683eff16653b31b (patch) | |
tree | 3a309f71e73889bbe39d1df18417c250fa6a686b /epan/dissectors/packet-iec104.c | |
parent | d7b286c7941bb0adf0566844637ffcc245bf1db1 (diff) |
Replace more deprecated tvb_length calls
The return values of new-style dissectors always use the captured length, so
replace those automagically with sed.
Change-Id: Ic43072ee4a80d433cd4264444583a0e670adc26a
Reviewed-on: https://code.wireshark.org/review/9065
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-iec104.c')
-rw-r--r-- | epan/dissectors/packet-iec104.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-iec104.c b/epan/dissectors/packet-iec104.c index 4a15d94692..abdbe98b61 100644 --- a/epan/dissectors/packet-iec104.c +++ b/epan/dissectors/packet-iec104.c @@ -1411,7 +1411,7 @@ static int dissect_iec104apci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre if (len < APDU_MIN_LEN) { expert_add_info_format(pinfo, ti, &ei_iec104_apdu_min_len, "APDU less than %d bytes", APDU_MIN_LEN); wmem_strbuf_append_printf(res, "<ERR ApduLen=%u bytes> ", len); - return tvb_length(tvb); + return tvb_captured_length(tvb); } temp8 = tvb_get_guint8(tvb, Off + 2); @@ -1472,7 +1472,7 @@ static int dissect_iec104apci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre proto_tree_add_item(it104tree, hf_apcidata, tvb, 0, Off, ENC_NA); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static int dissect_iec104reas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) @@ -1482,7 +1482,7 @@ static int dissect_iec104reas(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre */ tcp_dissect_pdus(tvb, pinfo, tree, TRUE, APCI_LEN, get_iec104apdu_len, dissect_iec104apci, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* The protocol has two subprotocols: Register APCI */ |