aboutsummaryrefslogtreecommitdiffstats
path: root/packet-asap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-11-28 03:57:50 +0000
committerGuy Harris <guy@alum.mit.edu>2002-11-28 03:57:50 +0000
commita56c79201d66010ecca23bf6f6d57ef4001ec1af (patch)
tree7c2cf753bee54e30f47560b8174dd9ec3a8ba5b9 /packet-asap.c
parent0abda39c906b53494ba5a0dd1c83c93e4b2a6b36 (diff)
Arguments to hash routines are gconstpointer's; assign them to const
pointers. The first argument to "sscanf()" is a "const char *"; don't cast const pointers to "char *" when passing them to "sscanf()". Assign the result of "tvb_get_ptr()" to const pointers, not non-const pointers. Make the "pdata" argument to various DCE routines a const pointer. svn path=/trunk/; revision=6688
Diffstat (limited to 'packet-asap.c')
-rw-r--r--packet-asap.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/packet-asap.c b/packet-asap.c
index efc5663d5c..dd7fa04cf2 100644
--- a/packet-asap.c
+++ b/packet-asap.c
@@ -6,7 +6,7 @@
*
* Copyright 2002, Michael Tuexen <Michael.Tuexen@icn.siemens.de>
*
- * $Id: packet-asap.c,v 1.5 2002/08/28 21:00:07 jmayer Exp $
+ * $Id: packet-asap.c,v 1.6 2002/11/28 03:57:49 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -209,13 +209,14 @@ dissect_ipv4_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, prot
static void
dissect_ipv6_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
{
- guint8 *ip6_address_ptr;
+ const guint8 *ip6_address_ptr;
- ip6_address_ptr = (guint8 *)tvb_get_ptr(parameter_tvb, IPV6_ADDRESS_OFFSET, IPV6_ADDRESS_LENGTH);
+ ip6_address_ptr = tvb_get_ptr(parameter_tvb, IPV6_ADDRESS_OFFSET, IPV6_ADDRESS_LENGTH);
proto_tree_add_ipv6(parameter_tree, hf_parameter_ipv6_address, parameter_tvb, IPV6_ADDRESS_OFFSET, IPV6_ADDRESS_LENGTH,
- (const guint8 *)ip6_address_ptr);
+ ip6_address_ptr);
- proto_item_set_text(parameter_item, "IPV6 address parameter: %s", ip6_to_str((struct e_in6_addr *)ip6_address_ptr));
+ proto_item_set_text(parameter_item, "IPV6 address parameter: %s",
+ ip6_to_str((const struct e_in6_addr *)ip6_address_ptr));
}
#define SCTP_PORT_LENGTH 2
@@ -329,12 +330,12 @@ static void
dissect_pool_handle_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
{
guint16 length, handle_length;
- char *handle_ptr;
+ const char *handle_ptr;
length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET);
handle_length = length - PARAMETER_HEADER_LENGTH;
- handle_ptr = (char *)tvb_get_ptr(parameter_tvb, POOL_HANDLE_OFFSET, handle_length);
+ handle_ptr = (const char *)tvb_get_ptr(parameter_tvb, POOL_HANDLE_OFFSET, handle_length);
proto_tree_add_bytes(parameter_tree, hf_pool_handle, parameter_tvb, POOL_HANDLE_OFFSET, handle_length, handle_ptr);
proto_item_set_text(parameter_item, "Pool handle");
}