aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-chdlc.c
diff options
context:
space:
mode:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2011-01-14 03:44:58 +0000
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2011-01-14 03:44:58 +0000
commit5fdb4a0aa7a4a0351d9c366a2c4a71d8f28861d5 (patch)
tree083d5704c0b3ba29be7a9fb4093e5116ca8f826c /epan/dissectors/packet-chdlc.c
parent1578a8614f3fc91f4e3e7658f0dea098db780856 (diff)
Replace ip_to_str((tvb_get_ptr(...)) with tvb_ip_to_str().
Replace ip6_to_str((tvb_get_ptr(...)) with tvb_ip6_to_str(). There's no need to pass the result of tvb_get_ptr() as the 'value' in proto_tree_add_*(): just use proto_tree_add_item(). Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s. Replace some memcpy()+tvb_get_ptr() with tvb_memcpy(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35529 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-chdlc.c')
-rw-r--r--epan/dissectors/packet-chdlc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-chdlc.c b/epan/dissectors/packet-chdlc.c
index 61d8a8856a..f4bccf2c55 100644
--- a/epan/dissectors/packet-chdlc.c
+++ b/epan/dissectors/packet-chdlc.c
@@ -288,14 +288,13 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
addr = tvb_get_ipv4(tvb, 4);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s, from %s, mask %s",
val_to_str(code, slarp_ptype_vals, "Unknown (%d)"),
- get_hostname(addr),
- ip_to_str(tvb_get_ptr(tvb, 8, 4)));
+ get_hostname(addr), tvb_ip_to_str(tvb, 8));
}
if (tree) {
proto_tree_add_uint(slarp_tree, hf_slarp_ptype, tvb, 0, 4, code);
proto_tree_add_item(slarp_tree, hf_slarp_address, tvb, 4, 4, FALSE);
proto_tree_add_text(slarp_tree, tvb, 8, 4,
- "Netmask: %s", ip_to_str(tvb_get_ptr(tvb, 8, 4)));
+ "Netmask: %s", tvb_ip_to_str(tvb, 8));
}
break;