diff options
author | Zhang Sheng <zhangsheng@uniontech.com> | 2020-11-16 11:19:17 +0800 |
---|---|---|
committer | Zhang Sheng <zhangsheng@uniontech.com> | 2020-11-16 12:53:37 +0000 |
commit | e13173c112b729da8f53dd2e81e8116a1ed857cf (patch) | |
tree | 49c2bce0c3349eebd0f2b62c80a1b7168ae45dc2 /src/network | |
parent | 802e5a45baf3ac7da2cb3be06d10bdd69696fcae (diff) |
Adjust code format, add space after 'if'
Change-Id: Ice081c891ff7f4b766f49dd4bd5cf18c30237acf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/kernel/qauthenticator.cpp | 10 | ||||
-rw-r--r-- | src/network/socket/qlocalserver_unix.cpp | 6 | ||||
-rw-r--r-- | src/network/socket/qnativesocketengine.cpp | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 86242b011f..c433b700ea 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -1228,7 +1228,7 @@ QByteArray qEncodeHmacMd5(QByteArray &key, const QByteArray &message) hash.reset(); // Adjust the key length to blockSize - if(blockSize < key.length()) { + if (blockSize < key.length()) { hash.addData(key); key = hash.result(); //MD5 will always return 16 bytes length output } @@ -1280,7 +1280,7 @@ static QByteArray qCreatev2Hash(const QAuthenticatorPrivate *ctx, Q_ASSERT(phase3 != nullptr); // since v2 Hash is need for both NTLMv2 and LMv2 it is calculated // only once and stored and reused - if(phase3->v2Hash.size() == 0) { + if (phase3->v2Hash.size() == 0) { QCryptographicHash md4(QCryptographicHash::Md4); QByteArray passUnicode = qStringAsUcs2Le(ctx->password); md4.addData(passUnicode.data(), passUnicode.size()); @@ -1317,7 +1317,7 @@ static QByteArray qExtractServerTime(const QByteArray& targetInfoBuff) ds >> avId; ds >> avLen; while(avId != 0) { - if(avId == AVTIMESTAMP) { + if (avId == AVTIMESTAMP) { timeArray.resize(avLen); //avLen size of QByteArray is allocated ds.readRawData(timeArray.data(), avLen); @@ -1352,13 +1352,13 @@ static QByteArray qEncodeNtlmv2Response(const QAuthenticatorPrivate *ctx, quint64 time = 0; QByteArray timeArray; - if(ch.targetInfo.len) + if (ch.targetInfo.len) { timeArray = qExtractServerTime(ch.targetInfoBuff); } //if server sends time, use it instead of current time - if(timeArray.size()) { + if (timeArray.size()) { ds.writeRawData(timeArray.constData(), timeArray.size()); } else { // number of seconds between 1601 and the epoch (1970) diff --git a/src/network/socket/qlocalserver_unix.cpp b/src/network/socket/qlocalserver_unix.cpp index c4085b440e..ea7e8e1e0e 100644 --- a/src/network/socket/qlocalserver_unix.cpp +++ b/src/network/socket/qlocalserver_unix.cpp @@ -135,10 +135,10 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName) } // bind - if(-1 == QT_SOCKET_BIND(listenSocket, (sockaddr *)&addr, sizeof(sockaddr_un))) { + if (-1 == QT_SOCKET_BIND(listenSocket, (sockaddr *)&addr, sizeof(sockaddr_un))) { setError(QLatin1String("QLocalServer::listen")); // if address is in use already, just close the socket, but do not delete the file - if(errno == EADDRINUSE) + if (errno == EADDRINUSE) QT_CLOSE(listenSocket); // otherwise, close the socket and delete the file else @@ -269,7 +269,7 @@ void QLocalServerPrivate::_q_onNewConnection() ::sockaddr_un addr; QT_SOCKLEN_T length = sizeof(sockaddr_un); int connectedSocket = qt_safe_accept(listenSocket, (sockaddr *)&addr, &length); - if(-1 == connectedSocket) { + if (-1 == connectedSocket) { setError(QLatin1String("QLocalSocket::activated")); closeServer(); } else { diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp index 6667a6b097..302b714cb4 100644 --- a/src/network/socket/qnativesocketengine.cpp +++ b/src/network/socket/qnativesocketengine.cpp @@ -972,7 +972,7 @@ void QNativeSocketEngine::close() if (d->exceptNotifier) d->exceptNotifier->setEnabled(false); - if(d->socketDescriptor != -1) { + if (d->socketDescriptor != -1) { d->nativeClose(); d->socketDescriptor = -1; } |