aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rrc.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-03 21:22:25 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-03 21:22:25 +0000
commit04ec1e0984303c54067558c4a96f495770f0f1e7 (patch)
tree4f510fc42e354c3e3bd2fbdd2cc5ce8b368838e3 /epan/dissectors/packet-rrc.c
parenta79e5d5b94b771c44d5918ecbdde3945b72fb1fb (diff)
Use explicit casts.
svn path=/trunk/; revision=48043
Diffstat (limited to 'epan/dissectors/packet-rrc.c')
-rw-r--r--epan/dissectors/packet-rrc.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c
index c941e381e9..4f3e75c198 100644
--- a/epan/dissectors/packet-rrc.c
+++ b/epan/dissectors/packet-rrc.c
@@ -16182,7 +16182,7 @@ dissect_rrc_ActivationTime(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
static int
dissect_rrc_RB_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 870 "../../asn1/rrc/rrc.cnf"
+#line 871 "../../asn1/rrc/rrc.cnf"
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
1U, 32U, &rbid, FALSE);
@@ -16199,7 +16199,7 @@ dissect_rrc_RB_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
static int
dissect_rrc_RLC_SequenceNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 876 "../../asn1/rrc/rrc.cnf"
+#line 877 "../../asn1/rrc/rrc.cnf"
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
0U, 4095U, &activation_frame, FALSE);
@@ -16224,7 +16224,8 @@ dissect_rrc_RB_ActivationTimeInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
rrc_ciphering_info * c_inf;
- fpinf = p_get_proto_data(actx->pinfo->fd, proto_fp);
+
+ fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp);
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_rrc_RB_ActivationTimeInfo, RB_ActivationTimeInfo_sequence);
@@ -16235,7 +16236,7 @@ dissect_rrc_RB_ActivationTimeInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
return offset;
}
/*This should not happen*/
- if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) == NULL ){
+ if( (c_inf = (rrc_ciphering_info *)g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) == NULL ){
return offset;
}
/*Set the ciphering activation frame information*/
@@ -20307,9 +20308,9 @@ dissect_rrc_H_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
#line 785 "../../asn1/rrc/rrc.cnf"
- rrcinf = p_get_proto_data(actx->pinfo->fd, proto_rrc);
+ rrcinf = (struct rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc);
if (!rrcinf) {
- rrcinf = se_alloc0(sizeof(struct rrc_info));
+ rrcinf = se_new0(struct rrc_info);
p_add_proto_data(actx->pinfo->fd, proto_rrc, rrcinf);
}
rrcinf->hrnti[actx->pinfo->fd->subnum] = tvb_get_ntohs(hrnti_tvb, 0);
@@ -41172,13 +41173,13 @@ dissect_rrc_DL_TransportChannelType_r5(tvbuff_t *tvb _U_, int offset _U_, asn1_c
num_chans_per_flow[flowd]++;
if(num_chans_per_flow[flowd] > 1 ){
- rrcinf = p_get_proto_data(actx->pinfo->fd, proto_rrc);
+ rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc);
if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI");
}
else{
/*If it doesnt exists, insert it*/
- if( (cur_val=g_tree_lookup(hsdsch_muxed_flows, GUINT_TO_POINTER((guint)rrcinf->hrnti[actx->pinfo->fd->subnum]))) == NULL ){
+ if( (cur_val=(gint *)g_tree_lookup(hsdsch_muxed_flows, GUINT_TO_POINTER((guint)rrcinf->hrnti[actx->pinfo->fd->subnum]))) == NULL ){
flowd_p = (guint*)g_malloc0(sizeof(gint));
*flowd_p = (1<<flowd); /*Set the bit to mark it as true*/
@@ -44647,13 +44648,13 @@ dissect_rrc_DL_TransportChannelType_r7(tvbuff_t *tvb _U_, int offset _U_, asn1_c
if(num_chans_per_flow[flowd] > 1 ){
- rrcinf = p_get_proto_data(actx->pinfo->fd, proto_rrc);
+ rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc);
if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI");
}
else{
/*If it doesnt exists, insert it*/
- if( (cur_val=g_tree_lookup(hsdsch_muxed_flows, GUINT_TO_POINTER((guint)rrcinf->hrnti[actx->pinfo->fd->subnum]))) == NULL ){
+ if( (cur_val=(gint *)g_tree_lookup(hsdsch_muxed_flows, GUINT_TO_POINTER((guint)rrcinf->hrnti[actx->pinfo->fd->subnum]))) == NULL ){
flowd_p = (guint*)g_malloc0(sizeof(gint));
*flowd_p = (1<<flowd); /* Set the bit to mark it as true*/
@@ -86655,7 +86656,7 @@ static const per_choice_t DL_DCCH_MessageType_choice[] = {
static int
dissect_rrc_DL_DCCH_MessageType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 880 "../../asn1/rrc/rrc.cnf"
+#line 881 "../../asn1/rrc/rrc.cnf"
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
ett_rrc_DL_DCCH_MessageType, DL_DCCH_MessageType_choice,
&msg_type);
@@ -86675,7 +86676,7 @@ static const per_sequence_t DL_DCCH_Message_sequence[] = {
static int
dissect_rrc_DL_DCCH_Message(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 883 "../../asn1/rrc/rrc.cnf"
+#line 884 "../../asn1/rrc/rrc.cnf"
offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
ett_rrc_DL_DCCH_Message, DL_DCCH_Message_sequence);
@@ -86701,7 +86702,7 @@ dissect_rrc_START_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
/*We base this map on communication context from fp*/
- fpinf = p_get_proto_data(actx->pinfo->fd, proto_fp);
+ fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp);
/*If no info found, skip all this*/
if(fpinf == NULL){
@@ -86717,8 +86718,8 @@ dissect_rrc_START_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
case RRC_NAS_SYS_INFO_PS:
/*Find the entry for the communication context (taken from FP)*/
- if( (c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) == NULL ){
- c_inf = g_malloc0(sizeof(rrc_ciphering_info));
+ if( (c_inf =(rrc_ciphering_info *)g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) == NULL ){
+ c_inf = g_new0(rrc_ciphering_info,1);
/*Initiate tree with START_PS values.*/
if(!c_inf->start_ps)
@@ -86734,7 +86735,7 @@ dissect_rrc_START_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
}
/*Retrieve and store the value*/
- start = g_malloc(sizeof(guint32));
+ start = g_new(guint32,1);
*start = tvb_get_bits32(start_val,0,20,ENC_BIG_ENDIAN);
if(c_inf && c_inf->start_ps)
/*Insert the value based on current frame num since this might vary over time*/
@@ -96770,8 +96771,8 @@ fp_info *fpinf ;
ett_rrc_SecurityModeComplete, SecurityModeComplete_sequence);
- fpinf = p_get_proto_data(actx->pinfo->fd, proto_fp);
- if(fpinf && ((c_inf = g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) != NULL) ){
+ fpinf = (fp_info *)p_get_proto_data(actx->pinfo->fd, proto_fp);
+ if(fpinf && ((c_inf = (rrc_ciphering_info *)g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) != NULL) ){
c_inf->setup_frame = actx->pinfo->fd->num;
}
@@ -112741,7 +112742,7 @@ static const per_choice_t HandoverToUTRANCommand_choice[] = {
static int
dissect_rrc_HandoverToUTRANCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 886 "../../asn1/rrc/rrc.cnf"
+#line 887 "../../asn1/rrc/rrc.cnf"
offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
ett_rrc_HandoverToUTRANCommand, HandoverToUTRANCommand_choice,
NULL);