aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>2011-09-19 19:59:00 +0000
committercmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>2011-09-19 19:59:00 +0000
commitefef6d20e582bba27e217d59674192b52a651b51 (patch)
tree35a6433346d6ff189f12ede306f08b65613432e0
parente67dc2a3053d38e939678f9908e4611317a8de4b (diff)
Don't assign the return value of proto_tree_add_item() if it's not going to be used. Fixes Coverity CID's 1278-1280 (UNUSED VALUE).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39051 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--epan/dissectors/packet-mim.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/epan/dissectors/packet-mim.c b/epan/dissectors/packet-mim.c
index 3647de3df6..e4733f3443 100644
--- a/epan/dissectors/packet-mim.c
+++ b/epan/dissectors/packet-mim.c
@@ -169,7 +169,6 @@ fp_get_hmac_addr (guint64 hmac, guint16 *swid, guint16 *sswid, guint16 *lid) {
static void
fp_add_hmac (tvbuff_t *tvb, proto_tree *tree, int offset) {
- proto_item *ti ;
guint16 eid;
if (!tree) {
@@ -184,19 +183,18 @@ fp_add_hmac (tvbuff_t *tvb, proto_tree *tree, int offset) {
eid &= FP_EID_MASK;
eid = ((eid & 0x00C0) >> 6) + ((eid & 0xFC00) >> 8);
- ti = proto_tree_add_uint(tree, hf_eid, tvb, offset,
- FP_BF_LEN, eid);
+ proto_tree_add_uint(tree, hf_eid, tvb, offset, FP_BF_LEN, eid);
- ti = proto_tree_add_item (tree, hf_ul, tvb, offset, FP_BF_LEN, ENC_NA);
- ti = proto_tree_add_item (tree, hf_ig, tvb, offset, FP_BF_LEN, ENC_NA);
- ti = proto_tree_add_item (tree, hf_ooodl, tvb, offset, FP_BF_LEN, ENC_NA);
- ti = proto_tree_add_item (tree, hf_swid, tvb, offset, FP_BF_LEN, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tree, hf_ul, tvb, offset, FP_BF_LEN, ENC_NA);
+ proto_tree_add_item (tree, hf_ig, tvb, offset, FP_BF_LEN, ENC_NA);
+ proto_tree_add_item (tree, hf_ooodl, tvb, offset, FP_BF_LEN, ENC_NA);
+ proto_tree_add_item (tree, hf_swid, tvb, offset, FP_BF_LEN, ENC_BIG_ENDIAN);
offset += FP_BF_LEN;
- ti = proto_tree_add_item (tree, hf_sswid, tvb, offset, FP_SSWID_LEN, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tree, hf_sswid, tvb, offset, FP_SSWID_LEN, ENC_BIG_ENDIAN);
offset += FP_SSWID_LEN;
- ti = proto_tree_add_item (tree, hf_lid, tvb, offset, FP_LID_LEN, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tree, hf_lid, tvb, offset, FP_LID_LEN, ENC_BIG_ENDIAN);
offset += FP_LID_LEN;
}
@@ -284,9 +282,9 @@ dissect_fp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
/* Skip ethertype */
offset += 2;
- ti = proto_tree_add_item (fp_tree, hf_ftag, tvb, offset, FP_FTAG_LEN, ENC_BIG_ENDIAN);
+ proto_tree_add_item (fp_tree, hf_ftag, tvb, offset, FP_FTAG_LEN, ENC_BIG_ENDIAN);
- ti = proto_tree_add_item (fp_tree, hf_ttl, tvb, offset, FP_FTAG_LEN, ENC_BIG_ENDIAN);
+ proto_tree_add_item (fp_tree, hf_ttl, tvb, offset, FP_FTAG_LEN, ENC_BIG_ENDIAN);
}
/* call the eth dissector */