Copy hf variables by value, not by reference.

svn path=/trunk/; revision=34682
This commit is contained in:
Jeff Morriss 2010-10-28 18:49:40 +00:00
parent 54e10cb509
commit 3971cb5d13
2 changed files with 16 additions and 16 deletions

View File

@ -490,8 +490,8 @@ dissect_mtp3_routing_label(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_t
proto_item *hidden_item;
proto_tree *label_tree;
proto_tree *pc_subtree;
int *hf_dpc_string;
int *hf_opc_string;
int hf_dpc_string;
int hf_opc_string;
switch (mtp3_standard) {
@ -535,11 +535,11 @@ dissect_mtp3_routing_label(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_t
case CHINESE_ITU_STANDARD:
if (mtp3_standard == ANSI_STANDARD)
{
hf_dpc_string = &hf_mtp3_ansi_dpc;
hf_opc_string = &hf_mtp3_ansi_opc;
hf_dpc_string = hf_mtp3_ansi_dpc;
hf_opc_string = hf_mtp3_ansi_opc;
} else /* CHINESE_ITU_STANDARD */ {
hf_dpc_string = &hf_mtp3_chinese_dpc;
hf_opc_string = &hf_mtp3_chinese_opc;
hf_dpc_string = hf_mtp3_chinese_dpc;
hf_opc_string = hf_mtp3_chinese_opc;
}
/* Create the Routing Label Tree */
@ -548,13 +548,13 @@ dissect_mtp3_routing_label(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_t
/* create and fill the DPC tree */
dissect_mtp3_3byte_pc(tvb, ANSI_DPC_OFFSET, label_tree, ett_mtp3_label_dpc, *hf_dpc_string, hf_mtp3_dpc_network,
dissect_mtp3_3byte_pc(tvb, ANSI_DPC_OFFSET, label_tree, ett_mtp3_label_dpc, hf_dpc_string, hf_mtp3_dpc_network,
hf_mtp3_dpc_cluster, hf_mtp3_dpc_member, hf_mtp3_24bit_dpc, hf_mtp3_24bit_pc);
/* Store dpc for mtp3_addr below */
dpc = tvb_get_letoh24(tvb, ANSI_DPC_OFFSET);
/* create and fill the OPC tree */
dissect_mtp3_3byte_pc(tvb, ANSI_OPC_OFFSET, label_tree, ett_mtp3_label_opc, *hf_opc_string, hf_mtp3_opc_network,
dissect_mtp3_3byte_pc(tvb, ANSI_OPC_OFFSET, label_tree, ett_mtp3_label_opc, hf_opc_string, hf_mtp3_opc_network,
hf_mtp3_opc_cluster, hf_mtp3_opc_member, hf_mtp3_24bit_opc, hf_mtp3_24bit_pc);
/* Store opc for mtp3_addr below */
opc = tvb_get_letoh24(tvb, ANSI_OPC_OFFSET);

View File

@ -610,19 +610,19 @@ dissect_mtp3mg_fcm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
} else /* ANSI_STANDARD and CHINESE_ITU_STANDARD */ {
int *hf_apc_string;
int hf_apc_string;
if (mtp3_standard == ANSI_STANDARD) {
hf_apc_string = &hf_mtp3mg_tfc_ansi_apc;
hf_apc_string = hf_mtp3mg_tfc_ansi_apc;
} else /* CHINESE_ITU_STANDARD */ {
hf_apc_string = &hf_mtp3mg_tfc_chinese_apc;
hf_apc_string = hf_mtp3mg_tfc_chinese_apc;
}
dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_fcm_apc,
*hf_apc_string, hf_mtp3mg_tfc_apc_network,
hf_apc_string, hf_mtp3mg_tfc_apc_network,
hf_mtp3mg_tfc_apc_cluster,
hf_mtp3mg_tfc_apc_member, 0, 0);
@ -921,14 +921,14 @@ dissect_mtp3mg_ufc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (mtp3_standard == ANSI_STANDARD
|| mtp3_standard == CHINESE_ITU_STANDARD)
{
int *hf_apc;
int hf_apc;
if (mtp3_standard == ANSI_STANDARD)
hf_apc = &hf_mtp3mg_upu_ansi_apc;
hf_apc = hf_mtp3mg_upu_ansi_apc;
else /* CHINESE_ITU_STANDARD */
hf_apc = &hf_mtp3mg_upu_chinese_apc;
hf_apc = hf_mtp3mg_upu_chinese_apc;
dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_upu_apc, *hf_apc,
dissect_mtp3_3byte_pc(tvb, 0, tree, ett_mtp3mg_upu_apc, hf_apc,
hf_mtp3mg_rsm_apc_network,
hf_mtp3mg_rsm_apc_cluster,
hf_mtp3mg_rsm_apc_member, 0, 0);