From da80656d0e18aa01a8e0b1f7850b310233e623d3 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 9 Jul 2005 00:47:57 +0000 Subject: MAC addresses are arrays of bytes, not strings; make the destination MAC address an array of guint8 - that squelches some compiler warnings. Use -1 rather than tvb_length(tvb) to make the item for LWAPP go to the end of the tvbuff. svn path=/trunk/; revision=14883 --- epan/dissectors/packet-lwapp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'epan') diff --git a/epan/dissectors/packet-lwapp.c b/epan/dissectors/packet-lwapp.c index 5e7439facb..8d5e55ed40 100644 --- a/epan/dissectors/packet-lwapp.c +++ b/epan/dissectors/packet-lwapp.c @@ -375,7 +375,7 @@ static void dissect_lwapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lwapp_tree; proto_tree *flags_tree; tvbuff_t *next_client; - char dest_mac[6]; + guint8 dest_mac[6]; guint8 have_destmac=0; /* Set up structures needed to add the protocol subtree and manage it */ @@ -394,7 +394,7 @@ static void dissect_lwapp(tvbuff_t *tvb, packet_info *pinfo, /* First, set up our dest mac, if we're a control packet with a * dest of port 12223 */ if (pinfo->destport == 12223 ) { - tvb_memcpy(tvb, (guint8*)dest_mac, offset, 6); + tvb_memcpy(tvb, dest_mac, offset, 6); have_destmac = 1; /* Copy our header */ @@ -428,8 +428,7 @@ static void dissect_lwapp(tvbuff_t *tvb, packet_info *pinfo, if (tree) { /* create display subtree for the protocol */ - ti = proto_tree_add_item(tree, proto_lwapp, tvb, offset, - tvb_length(tvb), FALSE); + ti = proto_tree_add_item(tree, proto_lwapp, tvb, offset, -1, FALSE); lwapp_tree = proto_item_add_subtree(ti, ett_lwapp); if (have_destmac) { -- cgit v1.2.3