From e8719413a7962f737938a59ce54637352fb282f4 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 27 Dec 2017 22:02:12 -0800 Subject: Cleanup: avoid uninitialized members This is basically to make Coverity happy. Coverity CID 208300 Signed-off-by: Dirk Hohndel --- core/downloadfromdcthread.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp index 799610f80..ede307ce0 100644 --- a/core/downloadfromdcthread.cpp +++ b/core/downloadfromdcthread.cpp @@ -179,16 +179,16 @@ DCDeviceData *DCDeviceData::m_instance = NULL; DCDeviceData::DCDeviceData(QObject *parent) : QObject(parent) { - if (m_instance) { - qDebug() << "already have an instance of DCDevieData"; - return; - } - m_instance = this; memset(&data, 0, sizeof(data)); data.trip = nullptr; data.download_table = nullptr; data.diveid = 0; data.deviceid = 0; + if (m_instance) { + qDebug() << "already have an instance of DCDevieData"; + return; + } + m_instance = this; } DCDeviceData *DCDeviceData::instance() -- cgit v1.2.3-70-g09d2