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>
This commit is contained in:
Evan Huus 2014-05-05 10:49:03 -04:00
parent a1ddde9600
commit 0523c2d0d7
1 changed files with 7 additions and 3 deletions

View File

@ -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");