diff options
author | Edward Welbourne <[email protected]> | 2021-02-17 12:21:54 +0100 |
---|---|---|
committer | Edward Welbourne <[email protected]> | 2021-02-18 11:21:49 +0100 |
commit | a54177cb940dc1d11d1591621edfe3ed42b0d778 (patch) | |
tree | c1e99ae49d206ba61a24da31a5505393bd5c83f4 /src/network/socket/qnativesocketengine_unix.cpp | |
parent | 94b9ee03b5646bf58c12337bbc44e38265ad15a2 (diff) |
Remove redundant invalid socket check
It happens after the same socket check has lead to an early return.
Prompted by a PVS-studio article.
Change-Id: I63b42abed9102df73d29e6ff8a89a475751d4b91
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: MÃ¥rten Nordheim <[email protected]>
Diffstat (limited to 'src/network/socket/qnativesocketengine_unix.cpp')
-rw-r--r-- | src/network/socket/qnativesocketengine_unix.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index a39b345d30f..a817bb8300a 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Copyright (C) 2016 Intel Corporation. ** Contact: https://www.qt.io/licensing/ ** @@ -312,10 +312,8 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc #endif socketDescriptor = socket; - if (socket != -1) { - this->socketProtocol = socketProtocol; - this->socketType = socketType; - } + this->socketProtocol = socketProtocol; + this->socketType = socketType; return true; } |