OSDN Git Service

use single variable assignment in QLocalServerPrivate::waitForNewConnection()
authorIvailo Monev <xakepa10@laimg.moc>
Tue, 24 Mar 2020 17:46:32 +0000 (17:46 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Tue, 24 Mar 2020 17:46:32 +0000 (17:46 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/network/socket/qlocalserver_unix.cpp

index 9a84aba..1c047dd 100644 (file)
@@ -183,8 +183,7 @@ void QLocalServerPrivate::waitForNewConnection(int msec, bool *timedOut)
     timeout.tv_sec = msec / 1000;
     timeout.tv_usec = (msec % 1000) * 1000;
 
-    int result = -1;
-    result = qt_safe_select(listenSocket + 1, &readfds, 0, 0, (msec == -1) ? 0 : &timeout);
+    int result = qt_safe_select(listenSocket + 1, &readfds, 0, 0, (msec == -1) ? 0 : &timeout);
     if (-1 == result) {
         setError(QLatin1String("QLocalServer::waitForNewConnection"));
         closeServer();