diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2016-01-23 13:18:30 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-01-23 23:15:54 +0000 |
commit | 720f57d0009fd3941d327d30dc064adbc5feb5a0 (patch) | |
tree | aa7cd0b0517ca1420865d8b4f5baba0562866286 /ui/qt/rtp_analysis_dialog.cpp | |
parent | dd4638948510babe0f64616dbdab0da58a6b559c (diff) |
ui: Code cleanup
Fixed code layout to use common style in the file.
Mostly whitespace changes.
Change-Id: Id37b57717a9e26248fad07322dff09b1d1f45ac2
Reviewed-on: https://code.wireshark.org/review/13504
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/rtp_analysis_dialog.cpp')
-rw-r--r-- | ui/qt/rtp_analysis_dialog.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/ui/qt/rtp_analysis_dialog.cpp b/ui/qt/rtp_analysis_dialog.cpp index 25abf9927c..04ddece52c 100644 --- a/ui/qt/rtp_analysis_dialog.cpp +++ b/ui/qt/rtp_analysis_dialog.cpp @@ -743,13 +743,15 @@ void RtpAnalysisDialog::savePayload(QTemporaryFile *tmpfile, tap_rtp_stat_t *sta /* Save the voice information */ /* If there was already an error, we quit */ - if (!tmpfile->isOpen() || tmpfile->error() != QFile::NoError) return; + if (!tmpfile->isOpen() || tmpfile->error() != QFile::NoError) + return; /* Quit if the captured length and packet length aren't equal or * if the RTP dissector thinks there is some information missing */ - if ((pinfo->fd->pkt_len != pinfo->fd->cap_len) - && (!rtpinfo->info_all_data_present)) { + if ((pinfo->fd->pkt_len != pinfo->fd->cap_len) && + (!rtpinfo->info_all_data_present)) + { tmpfile->close(); err_str_ = tr("Can't save in a file: Wrong length of captured packets."); return; @@ -758,18 +760,20 @@ void RtpAnalysisDialog::savePayload(QTemporaryFile *tmpfile, tap_rtp_stat_t *sta /* If padding bit is set but the padding count is bigger * then the whole RTP data - error with padding count */ - if ( (rtpinfo->info_padding_set != FALSE) - && (rtpinfo->info_padding_count > rtpinfo->info_payload_len) ) { + if ((rtpinfo->info_padding_set != FALSE) && + (rtpinfo->info_padding_count > rtpinfo->info_payload_len)) + { tmpfile->close(); err_str_ = tr("Can't save in a file: RTP data with padding."); return; } /* Do we need to insert some silence? */ - if ((rtpinfo->info_marker_set) - && ! (statinfo->flags & STAT_FLAG_FIRST) - && ! (statinfo->flags & STAT_FLAG_WRONG_TIMESTAMP) - && (statinfo->delta_timestamp > (rtpinfo->info_payload_len - rtpinfo->info_padding_count)) ) { + if ((rtpinfo->info_marker_set) && + !(statinfo->flags & STAT_FLAG_FIRST) && + !(statinfo->flags & STAT_FLAG_WRONG_TIMESTAMP) && + (statinfo->delta_timestamp > (rtpinfo->info_payload_len - rtpinfo->info_padding_count))) + { /* the amount of silence should be the difference between * the last timestamp and the current one minus x * x should equal the amount of information in the last frame @@ -803,8 +807,8 @@ void RtpAnalysisDialog::savePayload(QTemporaryFile *tmpfile, tap_rtp_stat_t *sta } - if ((rtpinfo->info_payload_type == PT_CN) - || (rtpinfo->info_payload_type == PT_CN_OLD)) { + if ((rtpinfo->info_payload_type == PT_CN) || + (rtpinfo->info_payload_type == PT_CN_OLD)) { } else { /* All other payloads */ const char *data; size_t nchars; |