USB Audio: fix Logically dead code (CID: 1247681)

Change-Id: I8a32b1aff45376246ea092459594fcae2f423755
Reviewed-on: https://code.wireshark.org/review/7867
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Alexis La Goutte 2015-03-31 16:31:34 +02:00 committed by Michael Mann
parent fa192dcb6b
commit b1f1c1f0e2
1 changed files with 4 additions and 6 deletions

View File

@ -490,7 +490,7 @@ dissect_usb_audio_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tre
usb_conv_info_t *usb_conv_info;
proto_tree *tree;
proto_item *ti;
gint offset;
gint offset = 0;
guint length = tvb_length(tvb);
@ -501,24 +501,22 @@ dissect_usb_audio_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tre
col_set_str(pinfo->cinfo, COL_PROTOCOL, "USBAUDIO");
ti = proto_tree_add_protocol_format(parent_tree, proto_usb_audio, tvb, 0, -1, "USB Audio");
ti = proto_tree_add_protocol_format(parent_tree, proto_usb_audio, tvb, offset, -1, "USB Audio");
tree = proto_item_add_subtree(ti, ett_usb_audio);
switch (usb_conv_info->interfaceSubclass)
{
case AUDIO_IF_SUBCLASS_MIDISTREAMING:
offset = 0;
col_set_str(pinfo->cinfo, COL_INFO, "USB-MIDI Event Packets");
while (offset > 0 && (guint) offset < length)
while ((guint) offset < length)
{
dissect_usb_midi_event(tvb, pinfo, tree, parent_tree, offset);
offset += 4;
}
break;
default:
offset = 0;
proto_tree_add_expert(tree, pinfo, &ei_usb_audio_undecoded, tvb, offset, length - offset);
proto_tree_add_expert(tree, pinfo, &ei_usb_audio_undecoded, tvb, offset, length);
}
return tvb_length(tvb);