aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pw-cesopsn.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2010-01-22 13:56:19 +0000
committerBill Meier <wmeier@newsguy.com>2010-01-22 13:56:19 +0000
commit1a4283ccf885f5a519c294d77f04e615ca209ee9 (patch)
tree05bac2c93b046f4c68a65c859d58bf7c474eb056 /epan/dissectors/packet-pw-cesopsn.c
parenta33e4ee41ef1f5408cf76b5cec564244aae15820 (diff)
Fixes for gcc -Wshadow warnings; Fix indentation and do other minor cleanup in a few cases.
svn path=/trunk/; revision=31617
Diffstat (limited to 'epan/dissectors/packet-pw-cesopsn.c')
-rw-r--r--epan/dissectors/packet-pw-cesopsn.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/epan/dissectors/packet-pw-cesopsn.c b/epan/dissectors/packet-pw-cesopsn.c
index 20e5eca8f5..7029bd77fe 100644
--- a/epan/dissectors/packet-pw-cesopsn.c
+++ b/epan/dissectors/packet-pw-cesopsn.c
@@ -265,64 +265,64 @@ void dissect_pw_cesopsn( tvbuff_t * tvb_original
pwc_item_append_cw(item,tvb_get_ntohl(tvb_original, 0),TRUE);
pwc_item_append_text_n_items(item,(int)payload_size,"octet");
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett);
{
tvbuff_t* tvb;
- proto_item* item;
+ proto_item* item2;
tvb = tvb_new_subset(tvb_original, 0, PWC_SIZEOF_CW, PWC_SIZEOF_CW);
- item = proto_tree_add_item(tree, hf_cw, tvb, 0, -1, FALSE);
- pwc_item_append_cw(item,tvb_get_ntohl(tvb, 0),FALSE);
+ item2 = proto_tree_add_item(tree2, hf_cw, tvb, 0, -1, FALSE);
+ pwc_item_append_cw(item2,tvb_get_ntohl(tvb, 0),FALSE);
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett);
+ proto_tree* tree3;
+ tree3 = proto_item_add_subtree(item, ett);
{
- proto_item* item;
+ proto_item* item3;
if (properties & PWC_CW_BAD_BITS03) /*display only if value is wrong*/
{
- item = proto_tree_add_item(tree, hf_cw_bits03, tvb, 0, 1, FALSE);
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ item3 = proto_tree_add_item(tree3, hf_cw_bits03, tvb, 0, 1, FALSE);
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Bits 0..3 of Control Word must be 0");
}
- item = proto_tree_add_item(tree, hf_cw_lm, tvb, 0, 1, FALSE);
+ item3 = proto_tree_add_item(tree3, hf_cw_lm, tvb, 0, 1, FALSE);
if (properties & PWC_CW_SUSPECT_LM)
{
- expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN
+ expert_add_info_format(pinfo, item3, PI_UNDECODED, PI_WARN
,"Reserved combination of L and Modifier bits");
}
- (void)proto_tree_add_item(tree, hf_cw_r, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree3, hf_cw_r, tvb, 0, 1, FALSE);
- item = proto_tree_add_item(tree, hf_cw_frg, tvb, 1, 1, FALSE);
+ item3 = proto_tree_add_item(tree3, hf_cw_frg, tvb, 1, 1, FALSE);
if (properties & PWC_CW_BAD_FRAG)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Fragmentation of payload is not allowed"
" for basic CESoPSN mode");
}
- item = proto_tree_add_item(tree, hf_cw_len, tvb, 1, 1, FALSE);
+ item3 = proto_tree_add_item(tree3, hf_cw_len, tvb, 1, 1, FALSE);
if (properties & PWC_CW_BAD_PAYLEN_LT_0)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Bad Length: too small, must be > %d"
,(int)encaps_size);
}
if (properties & PWC_CW_BAD_PAYLEN_GT_PACKET)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Bad Length: must be <= than PSN packet size (%d)"
,(int)packet_size);
}
if (properties & PWC_CW_BAD_LEN_MUST_BE_0)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Bad Length: must be 0 if CESoPSN packet size (%d) is > 64"
,(int)packet_size);
}
- proto_tree_add_item(tree, hf_cw_seq, tvb, 2, 2, FALSE);
+ proto_tree_add_item(tree3, hf_cw_seq, tvb, 2, 2, FALSE);
}
}
@@ -345,36 +345,36 @@ void dissect_pw_cesopsn( tvbuff_t * tvb_original
}
else
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett);
{
- proto_item* item;
+ proto_item* item2;
tvbuff_t* tvb;
tvb = tvb_new_subset(tvb_original, PWC_SIZEOF_CW, payload_size, payload_size);
- item = proto_tree_add_item(tree, hf_payload, tvb, 0, -1, FALSE);
- pwc_item_append_text_n_items(item,(int)payload_size,"octet");
+ item2 = proto_tree_add_item(tree2, hf_payload, tvb, 0, -1, FALSE);
+ pwc_item_append_text_n_items(item2,(int)payload_size,"octet");
if (properties & PWC_PAY_SIZE_BAD)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item2, PI_MALFORMED, PI_ERROR
,"CESoPSN packet payload size must be multiple of 8");
}
- tree = proto_item_add_subtree(item, ett);
- call_dissector(data_handle, tvb, pinfo, tree);
- item = proto_tree_add_int(tree, hf_payload_l, tvb, 0, 0
+ tree2 = proto_item_add_subtree(item2, ett);
+ call_dissector(data_handle, tvb, pinfo, tree2);
+ item2 = proto_tree_add_int(tree2, hf_payload_l, tvb, 0, 0
,(int)payload_size); /* allow filtering */
- PROTO_ITEM_SET_HIDDEN(item);
+ PROTO_ITEM_SET_HIDDEN(item2);
}
}
/* padding */
if (padding_size > 0)
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett);
{
tvbuff_t* tvb;
tvb = tvb_new_subset(tvb_original, PWC_SIZEOF_CW + payload_size, padding_size, -1);
- call_dissector(pw_padding_handle, tvb, pinfo, tree);
+ call_dissector(pw_padding_handle, tvb, pinfo, tree2);
}
}
}