aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/ethercat
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2011-03-23 05:18:26 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2011-03-23 05:18:26 +0000
commit875abf1deb00dc7c72db9539e89d0abee20ff856 (patch)
tree40aa581ac33bbb5b90f677be60a861311b400cd4 /plugins/ethercat
parentc317244ff8f16f8aaddcd7e1d11afd61a3e8a18f (diff)
dont assign to a proto_item* unless we are going to use the value
coverity 1157 svn path=/trunk/; revision=36276
Diffstat (limited to 'plugins/ethercat')
-rw-r--r--plugins/ethercat/packet-nv.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/ethercat/packet-nv.c b/plugins/ethercat/packet-nv.c
index 6a05fdb370..6e3b269996 100644
--- a/plugins/ethercat/packet-nv.c
+++ b/plugins/ethercat/packet-nv.c
@@ -126,11 +126,11 @@ static void dissect_nv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item_set_text(ti, "%s", szText);
offset+=(sizeof(guint8)*6);
- ti= proto_tree_add_item(nv_header_tree, hf_nv_count, tvb, offset, sizeof(guint16), TRUE);
+ proto_tree_add_item(nv_header_tree, hf_nv_count, tvb, offset, sizeof(guint16), TRUE);
nv_count = tvb_get_letohs(tvb, offset);
offset+=sizeof(guint16);
- ti= proto_tree_add_item(nv_header_tree, hf_nv_cycleindex, tvb, offset, sizeof(guint16), TRUE);
+ proto_tree_add_item(nv_header_tree, hf_nv_cycleindex, tvb, offset, sizeof(guint16), TRUE);
offset = NvParserHDR_Len;
for ( i=0; i < nv_count; i++ )
@@ -145,19 +145,19 @@ static void dissect_nv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_item(nv_var_tree, hf_nv_varheader, tvb, offset, ETYPE_88A4_NV_DATA_HEADER_Len, TRUE);
nv_varheader_tree = proto_item_add_subtree(ti, ett_nv_varheader);
- ti = proto_tree_add_item(nv_varheader_tree, hf_nv_id, tvb, offset, sizeof(guint16), TRUE);
+ proto_tree_add_item(nv_varheader_tree, hf_nv_id, tvb, offset, sizeof(guint16), TRUE);
offset+=sizeof(guint16);
- ti = proto_tree_add_item(nv_varheader_tree, hf_nv_hash, tvb, offset, sizeof(guint16), TRUE);
+ proto_tree_add_item(nv_varheader_tree, hf_nv_hash, tvb, offset, sizeof(guint16), TRUE);
offset+=sizeof(guint16);
- ti = proto_tree_add_item(nv_varheader_tree, hf_nv_length, tvb, offset, sizeof(guint16), TRUE);
+ proto_tree_add_item(nv_varheader_tree, hf_nv_length, tvb, offset, sizeof(guint16), TRUE);
offset+=sizeof(guint16);
- ti = proto_tree_add_item(nv_varheader_tree, hf_nv_quality, tvb, offset, sizeof(guint16), TRUE);
+ proto_tree_add_item(nv_varheader_tree, hf_nv_quality, tvb, offset, sizeof(guint16), TRUE);
offset+=sizeof(guint16);
- ti = proto_tree_add_item(nv_var_tree, hf_nv_data, tvb, offset, var_length, TRUE);
+ proto_tree_add_item(nv_var_tree, hf_nv_data, tvb, offset, var_length, TRUE);
offset+=var_length;
}
}