From 3971cb5d13071fce6b95ea40f6d4ea518d01702b Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Thu, 28 Oct 2010 18:49:40 +0000 Subject: [PATCH] Copy hf variables by value, not by reference. svn path=/trunk/; revision=34682 --- epan/dissectors/packet-mtp3.c | 16 ++++++++-------- epan/dissectors/packet-mtp3mg.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/epan/dissectors/packet-mtp3.c b/epan/dissectors/packet-mtp3.c index 523d02c5bd..31beccea5e 100644 --- a/epan/dissectors/packet-mtp3.c +++ b/epan/dissectors/packet-mtp3.c @@ -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); diff --git a/epan/dissectors/packet-mtp3mg.c b/epan/dissectors/packet-mtp3mg.c index 22ce5a2611..099b2f20dd 100644 --- a/epan/dissectors/packet-mtp3mg.c +++ b/epan/dissectors/packet-mtp3mg.c @@ -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);