From 518bb10d90e57fceef5a03eda7a4eab84aca1f07 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Mon, 24 Nov 2014 10:26:00 -0500 Subject: [PATCH] Remove use of pinfo->private_data since it's not used anywhere. Change-Id: Ibb47fd1a0d498cc9791ca31ee625395905a7e999 Reviewed-on: https://code.wireshark.org/review/5464 Reviewed-by: Michael Mann Petri-Dish: Michael Mann Reviewed-by: Anders Broman --- asn1/lcsap/lcsap.cnf | 8 ------- asn1/lcsap/packet-lcsap-template.c | 4 ---- epan/dissectors/packet-lcsap.c | 36 ++++++++++-------------------- 3 files changed, 12 insertions(+), 36 deletions(-) diff --git a/asn1/lcsap/lcsap.cnf b/asn1/lcsap/lcsap.cnf index 100ed7cfe3..b6d6594786 100644 --- a/asn1/lcsap/lcsap.cnf +++ b/asn1/lcsap/lcsap.cnf @@ -116,14 +116,6 @@ ProtocolIE-Field/value ie_field_value } - if (ProcedureCode != 0) - { - - _pro_code.code = ProcedureCode; - - actx->pinfo->private_data = &_pro_code; - - } #.END #.FN_PARS InitiatingMessage/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_InitiatingMessageValue diff --git a/asn1/lcsap/packet-lcsap-template.c b/asn1/lcsap/packet-lcsap-template.c index d902773625..9bd948849a 100644 --- a/asn1/lcsap/packet-lcsap-template.c +++ b/asn1/lcsap/packet-lcsap-template.c @@ -61,10 +61,6 @@ static dissector_handle_t lppa_handle; #define SCTP_PORT_LCSAP 9082 #include "packet-lcsap-val.h" -/* Strcture to hold ProcedureCode */ -struct pro_code { - guint8 code; -} _pro_code; /* Initialize the protocol and registered fields */ static int proto_lcsap = -1; diff --git a/epan/dissectors/packet-lcsap.c b/epan/dissectors/packet-lcsap.c index 809e93e5ce..233030cda5 100644 --- a/epan/dissectors/packet-lcsap.c +++ b/epan/dissectors/packet-lcsap.c @@ -113,10 +113,6 @@ typedef enum _ProtocolIE_ID_enum { /*--- End of included file: packet-lcsap-val.h ---*/ #line 64 "../../asn1/lcsap/packet-lcsap-template.c" -/* Strcture to hold ProcedureCode */ -struct pro_code { - guint8 code; -} _pro_code; /* Initialize the protocol and registered fields */ static int proto_lcsap = -1; @@ -239,7 +235,7 @@ static int hf_lcsap_successfulOutcome_value = -1; /* SuccessfulOutcome_value */ static int hf_lcsap_unsuccessfulOutcome_value = -1; /* UnsuccessfulOutcome_value */ /*--- End of included file: packet-lcsap-hf.c ---*/ -#line 78 "../../asn1/lcsap/packet-lcsap-template.c" +#line 74 "../../asn1/lcsap/packet-lcsap-template.c" /* Initialize the subtree pointers */ static int ett_lcsap = -1; @@ -294,7 +290,7 @@ static gint ett_lcsap_SuccessfulOutcome = -1; static gint ett_lcsap_UnsuccessfulOutcome = -1; /*--- End of included file: packet-lcsap-ett.c ---*/ -#line 83 "../../asn1/lcsap/packet-lcsap-template.c" +#line 79 "../../asn1/lcsap/packet-lcsap-template.c" /* Global variables */ static guint32 ProcedureCode; @@ -465,14 +461,6 @@ dissect_lcsap_ProcedureCode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx } - if (ProcedureCode != 0) - { - - _pro_code.code = ProcedureCode; - - actx->pinfo->private_data = &_pro_code; - - } return offset; } @@ -745,7 +733,7 @@ dissect_lcsap_Correlation_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_lcsap_DegreesLatitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 210 "../../asn1/lcsap/lcsap.cnf" +#line 202 "../../asn1/lcsap/lcsap.cnf" guint32 degrees; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, @@ -762,7 +750,7 @@ dissect_lcsap_DegreesLatitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act static int dissect_lcsap_DegreesLongitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 218 "../../asn1/lcsap/lcsap.cnf" +#line 210 "../../asn1/lcsap/lcsap.cnf" guint32 degrees; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, @@ -780,7 +768,7 @@ dissect_lcsap_DegreesLongitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac static int dissect_lcsap_PLMN_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 164 "../../asn1/lcsap/lcsap.cnf" +#line 156 "../../asn1/lcsap/lcsap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 3, 3, FALSE, ¶meter_tvb); @@ -848,7 +836,7 @@ dissect_lcsap_Geographical_Coordinates(tvbuff_t *tvb _U_, int offset _U_, asn1_c static int dissect_lcsap_Uncertainty_Code(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 202 "../../asn1/lcsap/lcsap.cnf" +#line 194 "../../asn1/lcsap/lcsap.cnf" guint32 uncertainty_code; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, @@ -1142,7 +1130,7 @@ dissect_lcsap_Global_eNB_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_lcsap_GNSS_Positioning_Method_And_Usage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 188 "../../asn1/lcsap/lcsap.cnf" +#line 180 "../../asn1/lcsap/lcsap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -1631,7 +1619,7 @@ dissect_lcsap_Payload_Type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ static int dissect_lcsap_Positioning_Method_And_Usage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 176 "../../asn1/lcsap/lcsap.cnf" +#line 168 "../../asn1/lcsap/lcsap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -2218,7 +2206,7 @@ static int dissect_LCS_AP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pro /*--- End of included file: packet-lcsap-fn.c ---*/ -#line 196 "../../asn1/lcsap/packet-lcsap-template.c" +#line 192 "../../asn1/lcsap/packet-lcsap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { @@ -2317,7 +2305,7 @@ proto_reg_handoff_lcsap(void) /*--- End of included file: packet-lcsap-dis-tab.c ---*/ -#line 256 "../../asn1/lcsap/packet-lcsap-template.c" +#line 252 "../../asn1/lcsap/packet-lcsap-template.c" } else { if (SctpPort != 0) { dissector_delete_uint("sctp.port", SctpPort, lcsap_handle); @@ -2799,7 +2787,7 @@ void proto_register_lcsap(void) { "UnsuccessfulOutcome_value", HFILL }}, /*--- End of included file: packet-lcsap-hfarr.c ---*/ -#line 301 "../../asn1/lcsap/packet-lcsap-template.c" +#line 297 "../../asn1/lcsap/packet-lcsap-template.c" }; /* List of subtrees */ @@ -2855,7 +2843,7 @@ void proto_register_lcsap(void) { &ett_lcsap_UnsuccessfulOutcome, /*--- End of included file: packet-lcsap-ettarr.c ---*/ -#line 307 "../../asn1/lcsap/packet-lcsap-template.c" +#line 303 "../../asn1/lcsap/packet-lcsap-template.c" }; module_t *lcsap_module;