diff options
author | Bill Meier <wmeier@newsguy.com> | 2012-04-23 17:50:02 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2012-04-23 17:50:02 +0000 |
commit | 72bf183742d430f6fbcc5f3c3168a962f7611f7d (patch) | |
tree | 9c9f46fe19afbcac4e37f163114a00e9647ae52a /epan/dissectors/packet-applemidi.c | |
parent | 159901cd1596b29a113272e1765a9c400fa62ad6 (diff) |
Do indentation cleanup (e.g., 4-space tabs => spaces)
Reformat a few long lines.
svn path=/trunk/; revision=42213
Diffstat (limited to 'epan/dissectors/packet-applemidi.c')
-rw-r--r-- | epan/dissectors/packet-applemidi.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/epan/dissectors/packet-applemidi.c b/epan/dissectors/packet-applemidi.c index a93cc19694..2cabe6026e 100644 --- a/epan/dissectors/packet-applemidi.c +++ b/epan/dissectors/packet-applemidi.c @@ -118,11 +118,11 @@ static const char applemidi_unknown_command[] = "unknown command: 0x%04x"; static void free_encoding_name_str (void *ptr) { - encoding_name_and_rate_t *encoding_name_and_rate = (encoding_name_and_rate_t *)ptr; + encoding_name_and_rate_t *encoding_name_and_rate = (encoding_name_and_rate_t *)ptr; - if (encoding_name_and_rate->encoding_name) { - g_free(encoding_name_and_rate->encoding_name); - } + if (encoding_name_and_rate->encoding_name) { + g_free(encoding_name_and_rate->encoding_name); + } } static void @@ -160,7 +160,10 @@ dissect_applemidi_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g * the protocol version, a random number generated by the initiator of the session, * the SSRC that is used by the respective sides RTP-entity and optionally the * name of the participant */ - if ( ( APPLEMIDI_COMMAND_INVITATION == command ) || ( APPLEMIDI_COMMAND_INVITATION_REJECTED == command ) || ( APLLEMIDI_COMMAND_INVITATION_ACCEPTED == command ) || ( APPLEMIDI_COMMAND_ENDSESSION == command ) ) { + if ( ( APPLEMIDI_COMMAND_INVITATION == command ) || + ( APPLEMIDI_COMMAND_INVITATION_REJECTED == command ) || + ( APLLEMIDI_COMMAND_INVITATION_ACCEPTED == command ) || + ( APPLEMIDI_COMMAND_ENDSESSION == command ) ) { proto_tree_add_item( applemidi_tree, hf_applemidi_protocol_version, tvb, offset, 4, ENC_BIG_ENDIAN ); offset += 4; @@ -229,7 +232,8 @@ dissect_applemidi_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g proto_tree_add_item( applemidi_tree, hf_applemidi_ssrc, tvb, offset, 4, ENC_BIG_ENDIAN ); offset += 4; - proto_tree_add_item( applemidi_tree, hf_applemidi_rtp_bitrate_limit, tvb, offset, 4, ENC_BIG_ENDIAN ); + proto_tree_add_item( applemidi_tree, hf_applemidi_rtp_bitrate_limit, + tvb, offset, 4, ENC_BIG_ENDIAN ); offset += 4; } /* If there is any remaining data (possibly because an unknown command was encountered), @@ -315,7 +319,8 @@ dissect_applemidi_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) { key = g_malloc( sizeof( gint ) ); *key = 97; g_hash_table_insert( rtp_dyn_payload, key, encoding_name_and_rate ); - rtp_add_address( pinfo, &pinfo->src, pinfo->srcport, 0, APPLEMIDI_DISSECTOR_SHORTNAME, pinfo->fd->num, FALSE, rtp_dyn_payload); + rtp_add_address( pinfo, &pinfo->src, pinfo->srcport, 0, APPLEMIDI_DISSECTOR_SHORTNAME, + pinfo->fd->num, FALSE, rtp_dyn_payload); /* call dissect_applemidi() from now on for UDP packets on this "connection" it is important to do this step after calling rtp_add_address, otherwise @@ -524,7 +529,9 @@ proto_register_applemidi( void ) &ett_applemidi_seq_num }; - proto_applemidi = proto_register_protocol( APPLEMIDI_DISSECTOR_NAME, APPLEMIDI_DISSECTOR_SHORTNAME, APPLEMIDI_DISSECTOR_ABBREVIATION ); + proto_applemidi = proto_register_protocol( APPLEMIDI_DISSECTOR_NAME, + APPLEMIDI_DISSECTOR_SHORTNAME, + APPLEMIDI_DISSECTOR_ABBREVIATION ); proto_register_field_array( proto_applemidi, hf, array_length( hf ) ); proto_register_subtree_array( ett, array_length( ett ) ); |