Commit eddea234 authored by Julian Helfferich's avatar Julian Helfferich
Browse files

Fix Coverity #76270: Initialize members

Several members in KBlocksNetServer were not initialized. I set all
pointers to nullptr, and members to the default values they get assigned
in executeGame().

I also commented out two members that are currently not used.
parent 9cea9079
......@@ -20,14 +20,19 @@
KBlocksNetServer::KBlocksNetServer(KBlocksGameLogic *p, const QString &localIP)
mpGameLogic = p;
maGameScoreList = nullptr;
mGameCount = 0;
mGameStarted = false;
mWaitForAll = false;
mTopGameLevel = -1;
mInitSendLength = 0;
mLvUpSendLength = 0;
parseIPString(localIP, &mLocalAddress, &mLocalPort);
// mRemoteAddress and mRemotePort are only used in recvRemoteData
// and will be set there.
mRemotePort = 0;
mpServerSocket = new QUdpSocket(this);
mpServerSocket->bind(mLocalAddress, mLocalPort);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment