From eb2d6593dca282de10e8dc13a5e2cde4523b800a Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 24 Jan 2002 09:20:54 +0000 Subject: Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls in arguments to "proto_tree_add_text()", and to "proto_tree_add_XXX()" calls that add FT_NONE or FT_PROTO items to the protocol tree, with -1. Replace some calls to "tvb_length()" or "tvb_length_remaining()" with calls to "tvb_reported_length()" and "tvb_reported_length_remaining()", as those give the actual length of the data in the packet, not just the data that happened to be captured. svn path=/trunk/; revision=4605 --- packet-klm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'packet-klm.c') diff --git a/packet-klm.c b/packet-klm.c index bbec6f4e7d..1e99dbbbd7 100644 --- a/packet-klm.c +++ b/packet-klm.c @@ -1,7 +1,7 @@ /* packet-klm.c 2001 Ronnie Sahlberg * Routines for klm dissection * - * $Id: packet-klm.c,v 1.6 2001/12/23 21:36:57 guy Exp $ + * $Id: packet-klm.c,v 1.7 2002/01/24 09:20:49 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -71,7 +71,7 @@ dissect_holder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) proto_tree* lock_tree = NULL; lock_item = proto_tree_add_item(tree, hf_klm_holder, tvb, - offset, tvb_length_remaining(tvb, offset), FALSE); + offset, -1, FALSE); lock_tree = proto_item_add_subtree(lock_item, ett_klm_holder); @@ -97,7 +97,7 @@ dissect_lock(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) proto_tree* lock_tree = NULL; lock_item = proto_tree_add_item(tree, hf_klm_lock, tvb, - offset, tvb_length_remaining(tvb, offset), FALSE); + offset, -1, FALSE); lock_tree = proto_item_add_subtree(lock_item, ett_klm_lock); @@ -258,4 +258,3 @@ proto_reg_handoff_klm(void) /* Register the procedure tables */ rpc_init_proc_table(KLM_PROGRAM, 1, klm1_proc); } - -- cgit v1.2.3