aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gtpv2.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2013-01-24 10:36:51 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2013-01-24 10:36:51 +0000
commit40efff20190f021abb33d472bb8830a6f426bcfa (patch)
tree85f4c043e98217185183c2f3d58a161aeea74e82 /epan/dissectors/packet-gtpv2.c
parent1bf78b2ba689d6c8f02895331f18fdca4a3c5bf4 (diff)
Fix warning: cast to pointer from integer of different size
While we are at it, restore the private data if no private extension dissector is not found (seems to be the right thing to do) svn path=/trunk/; revision=47255
Diffstat (limited to 'epan/dissectors/packet-gtpv2.c')
-rw-r--r--epan/dissectors/packet-gtpv2.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-gtpv2.c b/epan/dissectors/packet-gtpv2.c
index 97b531853e..704ba32266 100644
--- a/epan/dissectors/packet-gtpv2.c
+++ b/epan/dissectors/packet-gtpv2.c
@@ -4411,9 +4411,9 @@ dissect_gtpv2_private_ext(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
int offset = 0;
tvbuff_t *next_tvb;
guint16 ext_id;
- void *save_private_data = pinfo->private_data;
+ void *save_private_data = pinfo->private_data;
- pinfo->private_data = GUINT_TO_POINTER(instance);
+ pinfo->private_data = GUINT_TO_POINTER((guint32)instance);
/* oct 5 -7 Enterprise ID */
ext_id = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(tree, hf_gtpv2_enterprise_id, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -4423,9 +4423,10 @@ dissect_gtpv2_private_ext(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
next_tvb = tvb_new_subset(tvb, offset, length-2, length-2);
if (dissector_try_uint(gtpv2_priv_ext_dissector_table, ext_id, next_tvb, pinfo, tree)){
- pinfo->private_data = save_private_data;
+ pinfo->private_data = save_private_data;
return;
- }
+ }
+ pinfo->private_data = save_private_data;
proto_tree_add_text(tree, tvb, offset, length-2, "Proprietary value");
}