aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-hpsw.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2011-01-16 03:46:16 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2011-01-16 03:46:16 +0000
commitd553df218ebcb9e76299592b0794f0553ed63ff7 (patch)
treed425f254e94d747cc030227516704d5e0f6123a9 /epan/dissectors/packet-hpsw.c
parentf36e2be2874db3eb3917e2b9299509725d483ce3 (diff)
Use tvb_memeql().
Use tvb_ip_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 to ensure the return string is NULL terminated. svn path=/trunk/; revision=35547
Diffstat (limited to 'epan/dissectors/packet-hpsw.c')
-rw-r--r--epan/dissectors/packet-hpsw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-hpsw.c b/epan/dissectors/packet-hpsw.c
index a6e3e7d339..d37392afb9 100644
--- a/epan/dissectors/packet-hpsw.c
+++ b/epan/dissectors/packet-hpsw.c
@@ -173,9 +173,9 @@ dissect_hpsw_tlv(tvbuff_t *tvb, int offset, int length,
case HPFOO_IP_ADDR:
if (length == 4) {
- const guint8 *ipptr=tvb_get_ptr(tvb,offset,length);
- proto_item_set_text(ti, "IP Addr: %s", ip_to_str(ipptr));
- proto_tree_add_text(tree, tvb, offset, length, "IP Addr: %s", ip_to_str(ipptr));
+ const char *ipstr = tvb_ip_to_str(tvb, offset);
+ proto_item_set_text(ti, "IP Addr: %s", ipstr);
+ proto_tree_add_text(tree, tvb, offset, length, "IP Addr: %s", ipstr);
} else {
proto_item_set_text(ti, "IP Addr: Bad length %u", length);
proto_tree_add_text(tree, tvb, offset, length, "IP Addr: Bad length %u", length);