diff options
Diffstat (limited to 'src/corelib/io/qwindowspipereader.cpp')
-rw-r--r-- | src/corelib/io/qwindowspipereader.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/corelib/io/qwindowspipereader.cpp b/src/corelib/io/qwindowspipereader.cpp index 2312d5ca63..15c9f52cf3 100644 --- a/src/corelib/io/qwindowspipereader.cpp +++ b/src/corelib/io/qwindowspipereader.cpp @@ -270,13 +270,11 @@ void QWindowsPipeReader::readFileCompleted(DWORD errorCode, DWORD numberOfBytesT DWORD QWindowsPipeReader::checkPipeState() { DWORD bytes; - if (PeekNamedPipe(handle, NULL, 0, NULL, &bytes, NULL)) { + if (PeekNamedPipe(handle, nullptr, 0, nullptr, &bytes, nullptr)) return bytes; - } else { - if (!pipeBroken) { - pipeBroken = true; - emit pipeClosed(); - } + if (!pipeBroken) { + pipeBroken = true; + emit pipeClosed(); } return 0; } |