aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ndmp.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2015-06-23 11:24:48 -0700
committerEvan Huus <eapache@gmail.com>2015-06-23 18:25:52 +0000
commit8bc294c0d12e742d8c539177a683eff16653b31b (patch)
tree3a309f71e73889bbe39d1df18417c250fa6a686b /epan/dissectors/packet-ndmp.c
parentd7b286c7941bb0adf0566844637ffcc245bf1db1 (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-ndmp.c')
-rw-r--r--epan/dissectors/packet-ndmp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c
index d947c2068f..3b97ae6612 100644
--- a/epan/dissectors/packet-ndmp.c
+++ b/epan/dissectors/packet-ndmp.c
@@ -3173,7 +3173,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
proto_tree_add_item(ndmp_tree, hf_ndmp_fragment_data, tvb, 4, -1, ENC_NA);
pinfo->fragmented = save_fragmented;
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
}
else
@@ -3187,7 +3187,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
if (size < 24) {
/* too short to be NDMP */
pinfo->fragmented = save_fragmented;
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
/*
@@ -3197,7 +3197,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
if (!check_ndmp_hdr(new_tvb))
{
pinfo->fragmented = save_fragmented;
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
nh.seq = tvb_get_ntohl(new_tvb, offset);
@@ -3293,7 +3293,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
pinfo->fragmented = save_fragmented;
col_set_writable(pinfo->cinfo, save_writable);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
static guint
@@ -3390,7 +3390,7 @@ dissect_ndmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
tcp_dissect_pdus(tvb, pinfo, tree, ndmp_desegment, 4,
get_ndmp_pdu_len, dissect_ndmp_message, data);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
/* Called when doing a heuristic check;
@@ -3409,7 +3409,7 @@ dissect_ndmp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
tcp_dissect_pdus(tvb, pinfo, tree, ndmp_desegment, 28,
get_ndmp_pdu_len, dissect_ndmp_message, data);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
static void