Skip to content

Commit

Permalink
Remove unused offset variables.
Browse files Browse the repository at this point in the history
Fixes CID 1327340.

Change-Id: I1914e21ca7c0e911534a850fe2a8210b28650bee
Reviewed-on: https://code.wireshark.org/review/11055
Reviewed-by: Martin Mathieson <[email protected]>
  • Loading branch information
martinmath committed Oct 15, 2015
1 parent feb6b58 commit dfe1b0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
21 changes: 5 additions & 16 deletions ui/qt/lte_rlc_graph_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,26 +199,15 @@ void LteRlcGraphDialog::fillGraph()
acks_graph_->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssDisc, pkt_point_size_));
nacks_graph_->setScatterStyle(QCPScatterStyle(QCPScatterStyle::ssDisc, pkt_point_size_*2));


ts_offset_ = 0;
seq_offset_ = 0; // TODO: needed?
bool first = true;

// Map timestamps -> segments in first pass.
time_stamp_map_.clear();
for (struct rlc_segment *seg = graph_.segments; seg != NULL; seg = seg->next) {
if (!compareHeaders(seg)) {
continue;
}
double ts = seg->rel_secs + seg->rel_usecs / 1000000.0;
if (first) {
// Take note of first sequence number seen.
if (seq_origin_zero_) {
seq_offset_ = seg->SN;
}
first = false;
}
time_stamp_map_.insertMulti(ts - ts_offset_, seg);

time_stamp_map_.insertMulti(ts, seg);
}

// Now sequence numbers.
Expand All @@ -227,17 +216,17 @@ void LteRlcGraphDialog::fillGraph()
acks_time, acks,
nacks_time, nacks;
for (struct rlc_segment *seg = graph_.segments; seg != NULL; seg = seg->next) {
double ts = (seg->rel_secs + seg->rel_usecs / 1000000.0) - ts_offset_;
double ts = seg->rel_secs + seg->rel_usecs / 1000000.0;
if (compareHeaders(seg)) {
if (!seg->isControlPDU) {
// Data
if (seg->isResegmented) {
reseg_seq_time.append(ts);
reseg_seq.append(seg->SN - seq_offset_);
reseg_seq.append(seg->SN);
}
else {
seq_time.append(ts);
seq.append(seg->SN - seq_offset_);
seq.append(seg->SN);
}
}
else {
Expand Down
3 changes: 0 additions & 3 deletions ui/qt/lte_rlc_graph_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ class LteRlcGraphDialog : public WiresharkDialog

// Data
QMap<double, struct rlc_segment *> time_stamp_map_;
double ts_offset_;
QMap<double, struct rlc_segment *> sequence_num_map_;
double seq_offset_;
bool seq_origin_zero_;

QCPGraph *base_graph_; // Clickable packets
QCPGraph *reseg_graph_;
Expand Down

0 comments on commit dfe1b0f

Please sign in to comment.