aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btl2cap.c
diff options
context:
space:
mode:
authorAnders Broman <a.broman58@gmail.com>2015-07-12 20:04:14 +0000
committerAnders Broman <a.broman58@gmail.com>2015-07-12 20:05:21 +0000
commite92086849af8e8611ec2e789aa33a4734ff4208b (patch)
tree01e7723627e7b431b820030ff0b7e5991d8245be /epan/dissectors/packet-btl2cap.c
parent39a2d9468b019c5c7de4b21eb497772b1336c36f (diff)
Revert "[MSVC2015] TRy to fix Warnings turned errors."
This reverts commit 8d78077d0d931c6afee6d0e27b5df7c5477e21e5. Reverted as requested. Change-Id: I99461820d28215a52cc6bae6792f2892018d28b8 Reviewed-on: https://code.wireshark.org/review/9609 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-btl2cap.c')
-rw-r--r--epan/dissectors/packet-btl2cap.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/epan/dissectors/packet-btl2cap.c b/epan/dissectors/packet-btl2cap.c
index cb7c36f3f1..712bc2418c 100644
--- a/epan/dissectors/packet-btl2cap.c
+++ b/epan/dissectors/packet-btl2cap.c
@@ -419,9 +419,14 @@ static void btl2cap_cid_prompt(packet_info *pinfo, gchar* result)
static gpointer btl2cap_cid_value(packet_info *pinfo)
{
+ gulong *value_data;
+
+ value_data = (gulong *) p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_CID_CONV);
- return (gpointer)p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_CID_CONV);
+ if (value_data)
+ return (gpointer) *value_data;
+ return NULL;
}
static void btl2cap_psm_prompt(packet_info *pinfo, gchar* result)
@@ -437,9 +442,14 @@ static void btl2cap_psm_prompt(packet_info *pinfo, gchar* result)
static gpointer btl2cap_psm_value(packet_info *pinfo)
{
+ gulong *value_data;
+
+ value_data = (gulong *) p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_PSM_CONV);
- return (gpointer) p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_PSM_CONV);
+ if (value_data)
+ return (gpointer) *value_data;
+ return NULL;
}
static void btl2cap_serv_prompt(packet_info *pinfo, gchar* result)
@@ -455,9 +465,14 @@ static void btl2cap_serv_prompt(packet_info *pinfo, gchar* result)
static gpointer btl2cap_serv_value(packet_info *pinfo)
{
+ gulong *value_data;
- return (gpointer) p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_SERV_CONV);
+ value_data = (gulong *) p_get_proto_data(pinfo->pool, pinfo, proto_btl2cap, BTL2CAP_SERV_CONV);
+
+ if (value_data)
+ return (gpointer) *value_data;
+ return NULL;
}
static guint16