From f449146ae3154d14150159f7f21cf9dbaf2ba6df Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 9 Oct 2017 14:28:56 +0200 Subject: [PATCH] ntdll: Remove no longer needed handling of FD_TYPE_PIPE. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/ntdll/file.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 35fd2c1beb0..ca2afa0e89e 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -711,7 +711,6 @@ static NTSTATUS get_io_timeouts( HANDLE handle, enum server_fd_type type, ULONG } break; case FD_TYPE_SOCKET: - case FD_TYPE_PIPE: case FD_TYPE_CHAR: if (is_read) timeouts->interval = 0; /* return as soon as we got something */ break; @@ -764,7 +763,6 @@ static NTSTATUS get_io_avail_mode( HANDLE handle, enum server_fd_type type, BOOL break; case FD_TYPE_MAILSLOT: case FD_TYPE_SOCKET: - case FD_TYPE_PIPE: case FD_TYPE_CHAR: *avail_mode = TRUE; break; @@ -1128,7 +1126,7 @@ static NTSTATUS FILE_AsyncWriteService( void *user, IO_STATUS_BLOCK *iosb, NTSTA &needs_close, &type, NULL ))) break; - if (!fileio->count && (type == FD_TYPE_MAILSLOT || type == FD_TYPE_PIPE || type == FD_TYPE_SOCKET)) + if (!fileio->count && (type == FD_TYPE_MAILSLOT || type == FD_TYPE_SOCKET)) result = send( fd, fileio->buffer, 0, 0 ); else result = write( fd, &fileio->buffer[fileio->already], fileio->count - fileio->already ); @@ -1308,7 +1306,7 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent, for (;;) { /* zero-length writes on sockets may not work with plain write(2) */ - if (!length && (type == FD_TYPE_MAILSLOT || type == FD_TYPE_PIPE || type == FD_TYPE_SOCKET)) + if (!length && (type == FD_TYPE_MAILSLOT || type == FD_TYPE_SOCKET)) result = send( unix_handle, buffer, 0, 0 ); else result = write( unix_handle, (const char *)buffer + total, length - total );