aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-6lowpan.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2011-04-04 15:38:19 +0000
committerBill Meier <wmeier@newsguy.com>2011-04-04 15:38:19 +0000
commitaec98c121a0c6c861f4122c49464a7779553f86b (patch)
treee2c38fafb5050592d5be710c3bbe38c8501c700c /epan/dissectors/packet-6lowpan.c
parentede51600c766c9726128edc444158e67aabcdc51 (diff)
Don't assign to a proto_item * if the value won't be used: Coverity 820/821;
Also: #include <stdio.h> & <string.h> not required; svn path=/trunk/; revision=36447
Diffstat (limited to 'epan/dissectors/packet-6lowpan.c')
-rw-r--r--epan/dissectors/packet-6lowpan.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c
index 50a033c37e..fd6fbc0703 100644
--- a/epan/dissectors/packet-6lowpan.c
+++ b/epan/dissectors/packet-6lowpan.c
@@ -47,8 +47,6 @@
# include "wsutil/inet_v6defs.h"
#endif
-#include <stdio.h>
-#include <string.h>
#include <glib.h>
#include <epan/packet.h>
#include <epan/prefs.h>
@@ -1175,7 +1173,6 @@ dissect_6lowpan_iphc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint d
gint length = 0;
proto_tree * iphc_tree = NULL;
proto_item * ti = NULL;
- proto_item * ti_sam = NULL;
proto_item * ti_dam = NULL;
gboolean addr_err;
/* IPHC header fields. */
@@ -1220,7 +1217,7 @@ dissect_6lowpan_iphc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint d
proto_tree_add_uint (iphc_tree, hf_6lowpan_iphc_flag_hlim, tvb, offset, sizeof(guint16), iphc_flags & LOWPAN_IPHC_FLAG_HLIM);
proto_tree_add_boolean (iphc_tree, hf_6lowpan_iphc_flag_cid, tvb, offset, sizeof(guint16), iphc_flags & LOWPAN_IPHC_FLAG_CONTEXT_ID);
proto_tree_add_boolean (iphc_tree, hf_6lowpan_iphc_flag_sac, tvb, offset, sizeof(guint16), iphc_flags & LOWPAN_IPHC_FLAG_SRC_COMP);
- ti_sam = proto_tree_add_uint(iphc_tree, hf_6lowpan_iphc_flag_sam, tvb, offset, sizeof(guint16), iphc_flags & LOWPAN_IPHC_FLAG_SRC_MODE);
+ proto_tree_add_uint(iphc_tree, hf_6lowpan_iphc_flag_sam, tvb, offset, sizeof(guint16), iphc_flags & LOWPAN_IPHC_FLAG_SRC_MODE);
proto_tree_add_boolean (iphc_tree, hf_6lowpan_iphc_flag_mcast, tvb, offset, sizeof(guint16), iphc_flags & LOWPAN_IPHC_FLAG_MCAST_COMP);
proto_tree_add_boolean (iphc_tree, hf_6lowpan_iphc_flag_dac, tvb, offset, sizeof(guint16), iphc_flags & LOWPAN_IPHC_FLAG_DST_COMP);
/* Destination address mode changes meanings depending on multicast compression. */
@@ -1357,7 +1354,7 @@ dissect_6lowpan_iphc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint d
/* Format becomes ff:fe00:xxxx */
ipv6.ip6_src.bytes[11] = 0xff;
ipv6.ip6_src.bytes[12] = 0xfe;
-
+
}
if (length) {
tvb_memcpy(tvb, &ipv6.ip6_src.bytes[sizeof(ipv6.ip6_src) - length], offset, length);
@@ -1365,7 +1362,7 @@ dissect_6lowpan_iphc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint d
/* Display the source IPv6 address. */
if (tree) {
- ti = proto_tree_add_ipv6(tree, hf_6lowpan_source, tvb, offset, length, (guint8 *)&ipv6.ip6_src);
+ proto_tree_add_ipv6(tree, hf_6lowpan_source, tvb, offset, length, (guint8 *)&ipv6.ip6_src);
}
offset += length;
/*
@@ -1477,7 +1474,7 @@ dissect_6lowpan_iphc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint d
/* Display the destination IPv6 address. */
if (tree) {
- ti = proto_tree_add_ipv6(tree, hf_6lowpan_dest, tvb, offset, length, (guint8 *)&ipv6.ip6_dst);
+ proto_tree_add_ipv6(tree, hf_6lowpan_dest, tvb, offset, length, (guint8 *)&ipv6.ip6_dst);
}
offset += length;
/*