aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-zdp.c
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2011-03-23 14:51:40 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2011-03-23 14:51:40 +0000
commita2a5ca2c16537e6faaa5656df6094586d3ee8315 (patch)
tree3a5214378f193659fcd4245ae25f56bcf8c495b2 /epan/dissectors/packet-zbee-zdp.c
parenta27566357bfc0119df73dcaa63de5a18ca62e54a (diff)
Fix bug: 'guint8 |=0x8000'.
Coverity 350 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36289 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-zbee-zdp.c')
-rw-r--r--epan/dissectors/packet-zbee-zdp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/epan/dissectors/packet-zbee-zdp.c b/epan/dissectors/packet-zbee-zdp.c
index 2d75cb8c70..dd3969de70 100644
--- a/epan/dissectors/packet-zbee-zdp.c
+++ b/epan/dissectors/packet-zbee-zdp.c
@@ -425,13 +425,15 @@ zdp_status_name(guint8 status)
static guint16
zdp_convert_2003cluster(guint8 cluster)
{
- if (cluster & ZBEE_ZDP_MSG_RESPONSE_BIT_2003) {
+ guint16 cluster16 = (guint16)cluster;
+
+ if (cluster16 & ZBEE_ZDP_MSG_RESPONSE_BIT_2003) {
/* Clear the 2003 request bit. */
- cluster &= ~(ZBEE_ZDP_MSG_RESPONSE_BIT_2003);
+ cluster16 &= ~(ZBEE_ZDP_MSG_RESPONSE_BIT_2003);
/* Set the 2006 request bit. */
- cluster |= (ZBEE_ZDP_MSG_RESPONSE_BIT);
+ cluster16 |= (ZBEE_ZDP_MSG_RESPONSE_BIT);
}
- return (guint16)cluster;
+ return cluster16;
} /* zdp_convert_2003cluster */
/*FUNCTION:------------------------------------------------------
@@ -1093,7 +1095,7 @@ dissect_zbee_zdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_root = proto_tree_add_protocol_format(tree, proto_zbee_zdp, tvb, offset, tvb_length(tvb), "ZigBee Device Profile");
zdp_tree = proto_item_add_subtree(proto_root, ett_zbee_zdp);
}
-#if 0
+#if 0
/* Overwrite the protocol column */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ZigBee ZDP");
#endif