Set member variables in initialiser list (rather than in CTOR bodies).
Also simplify some boolean logic in packet-dcerpc.c. All reported by cppcheck. Change-Id: I2075f2ec10dc777ad7635da4ef056d17fc5b0be0 Reviewed-on: https://code.wireshark.org/review/37609 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
This commit is contained in:
parent
d70bd4489f
commit
570a0cb301
|
@ -4487,7 +4487,7 @@ dissect_dcerpc_cn_stub(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
fd_head = fragment_add_seq_next(&dcerpc_co_reassembly_table,
|
||||
decrypted_tvb, 0, pinfo, frame, NULL,
|
||||
tvb_reported_length(decrypted_tvb),
|
||||
hdr->flags&PFC_LAST_FRAG ? FALSE : TRUE /* more_frags */);
|
||||
!(hdr->flags & PFC_LAST_FRAG) /* more_frags */);
|
||||
|
||||
end_cn_stub:
|
||||
|
||||
|
|
|
@ -51,12 +51,12 @@ CaptureEvent::CaptureEvent(Context ctx, EventType evt, capture_session * session
|
|||
{
|
||||
}
|
||||
|
||||
CaptureEvent::CaptureEvent(const CaptureEvent &ce)
|
||||
CaptureEvent::CaptureEvent(const CaptureEvent &ce) :
|
||||
_ctx(ce._ctx),
|
||||
_evt(ce._evt),
|
||||
_filePath(ce._filePath),
|
||||
_session(ce._session)
|
||||
{
|
||||
_ctx = ce._ctx;
|
||||
_evt = ce._evt;
|
||||
_session = ce._session;
|
||||
_filePath = ce._filePath;
|
||||
}
|
||||
|
||||
CaptureEvent::Context CaptureEvent::captureContext() const
|
||||
|
|
|
@ -67,11 +67,13 @@ class Iax2AnalysisTreeWidgetItem : public QTreeWidgetItem
|
|||
{
|
||||
public:
|
||||
Iax2AnalysisTreeWidgetItem(QTreeWidget *tree, tap_iax2_stat_t *statinfo, packet_info *pinfo) :
|
||||
QTreeWidgetItem(tree, iax2_analysis_type_)
|
||||
QTreeWidgetItem(tree, iax2_analysis_type_),
|
||||
frame_num_(pinfo->num),
|
||||
pkt_len_(pinfo->fd->pkt_len),
|
||||
flags_(statinfo->flags),
|
||||
bandwidth_(statinfo->bandwidth),
|
||||
ok_(false)
|
||||
{
|
||||
frame_num_ = pinfo->num;
|
||||
pkt_len_ = pinfo->fd->pkt_len;
|
||||
flags_ = statinfo->flags;
|
||||
if (flags_ & STAT_FLAG_FIRST) {
|
||||
delta_ = 0.0;
|
||||
jitter_ = 0.0;
|
||||
|
@ -79,8 +81,6 @@ public:
|
|||
delta_ = statinfo->delta;
|
||||
jitter_ = statinfo->jitter;
|
||||
}
|
||||
bandwidth_ = statinfo->bandwidth;
|
||||
ok_ = false;
|
||||
|
||||
QColor bg_color = QColor();
|
||||
QString status;
|
||||
|
|
|
@ -27,14 +27,15 @@ class InterfaceToolbarReader : public QObject
|
|||
|
||||
public:
|
||||
InterfaceToolbarReader(QString ifname, void *control_in, QObject *parent = 0) :
|
||||
QObject(parent), ifname_(ifname)
|
||||
{
|
||||
QObject(parent),
|
||||
ifname_(ifname),
|
||||
#ifdef _WIN32
|
||||
control_in_ = (HANDLE)control_in;
|
||||
control_in_((HANDLE)control_in)
|
||||
#else
|
||||
control_in_ = (char *)control_in;
|
||||
fd_in_ = -1;
|
||||
control_in_((char *)control_in),
|
||||
fd_in_(-1)
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
public slots:
|
||||
|
|
|
@ -44,9 +44,9 @@ PrefsItem::PrefsItem(module_t *module, pref_t *pref, PrefsItem* parent)
|
|||
: ModelHelperTreeItem<PrefsItem>(parent),
|
||||
pref_(pref),
|
||||
module_(module),
|
||||
name_(module->name ? module->name : module->parent->name),
|
||||
changed_(false)
|
||||
{
|
||||
name_ = QString(module->name ? module->name : module->parent->name);
|
||||
if (pref_ != NULL) {
|
||||
name_ += QString(".%1").arg(prefs_get_name(pref_));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue