aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mausb.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2014-05-05 10:49:03 -0400
committerEvan Huus <eapache@gmail.com>2014-05-05 14:50:09 +0000
commit0523c2d0d7d264f0e1774f2a919367aab39cc9e9 (patch)
treec1f4eafec08e2690a098dd145163ffc48161c99e /epan/dissectors/packet-mausb.c
parenta1ddde96008b7c403f6dc6c8b4b75e01718f95c6 (diff)
Fix build with older compilers
The struct literal syntax {0} does not appear to be universally supported - use memset instead. Change-Id: If70d475cf3d7a582c43dcc879cefebc9aef0a99e Reviewed-on: https://code.wireshark.org/review/1508 Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-mausb.c')
-rw-r--r--epan/dissectors/packet-mausb.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/epan/dissectors/packet-mausb.c b/epan/dissectors/packet-mausb.c
index 20a2b1ca83..085119ca84 100644
--- a/epan/dissectors/packet-mausb.c
+++ b/epan/dissectors/packet-mausb.c
@@ -600,8 +600,8 @@ static guint8 mausb_get_size_ep_des(tvbuff_t *tvb, gint offset)
static guint16 dissect_mausb_mgmt_pkt_ep_handle( proto_tree *tree, tvbuff_t *tvb,
packet_info *pinfo, gint16 start, gboolean req)
{
- usb_trans_info_t usb_trans_info = {0};
- usb_conv_info_t usb_conv_info = {0};
+ usb_trans_info_t usb_trans_info;
+ usb_conv_info_t usb_conv_info;
proto_item *size_field;
guint16 offset = start;
guint16 loop_offset;
@@ -609,6 +609,9 @@ static guint16 dissect_mausb_mgmt_pkt_ep_handle( proto_tree *tree, tvbuff_t *tvb
guint8 size_ep_des;
int i;
+ memset(&usb_trans_info, 0, sizeof(usb_trans_info_t));
+ memset(&usb_conv_info, 0, sizeof(usb_conv_info_t));
+
num_ep = tvb_get_guint8(tvb, offset) & MAUSB_MGMT_NUM_EP_DES_MASK;
if (req) {
@@ -861,10 +864,11 @@ dissect_mausb_pkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree *flags_tree;
proto_tree *tflags_tree;
/* Other misc. local variables. */
- struct mausb_header header = {0};
+ struct mausb_header header;
gint offset = 0;
gint payload_len;
+ memset(&header, 0, sizeof(struct mausb_header));
/* Set the Protocol column to the constant string of mausb */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MAUSB");