Alex Henrie alexhenrie24@gmail.com writes:
@@ -854,11 +857,11 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent, goto done; } }
- else if (type == FD_TYPE_SERIAL || type == FD_TYPE_DEVICE)
- else if (type == FD_TYPE_SERIAL) {
if (async_read && (!offset || offset->QuadPart < 0))
if (!length) {
status = STATUS_INVALID_PARAMETER;
status = STATUS_SUCCESS; goto done;
I think it would be cleaner to use the same code path as the other types (calling read() first) instead of adding a special case for serial.