diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
| commit | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (patch) | |
| tree | 4adf86a776049cbf7f69a1929c4babcbbef925eb /lldb/source/Host/posix/PipePosix.cpp | |
| parent | 7cc9cf2bf09f069cb2dd947ead05d0b54301fb71 (diff) | |
Notes
Diffstat (limited to 'lldb/source/Host/posix/PipePosix.cpp')
| -rw-r--r-- | lldb/source/Host/posix/PipePosix.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lldb/source/Host/posix/PipePosix.cpp b/lldb/source/Host/posix/PipePosix.cpp index efdc151e37633..ce1baf3f12a30 100644 --- a/lldb/source/Host/posix/PipePosix.cpp +++ b/lldb/source/Host/posix/PipePosix.cpp @@ -270,8 +270,8 @@ Status PipePosix::ReadWithTimeout(void *buf, size_t size, while (error.Success()) { error = select_helper.Select(); if (error.Success()) { - auto result = ::read(fd, reinterpret_cast<char *>(buf) + bytes_read, - size - bytes_read); + auto result = + ::read(fd, static_cast<char *>(buf) + bytes_read, size - bytes_read); if (result != -1) { bytes_read += result; if (bytes_read == size || result == 0) @@ -301,9 +301,8 @@ Status PipePosix::Write(const void *buf, size_t size, size_t &bytes_written) { while (error.Success()) { error = select_helper.Select(); if (error.Success()) { - auto result = - ::write(fd, reinterpret_cast<const char *>(buf) + bytes_written, - size - bytes_written); + auto result = ::write(fd, static_cast<const char *>(buf) + bytes_written, + size - bytes_written); if (result != -1) { bytes_written += result; if (bytes_written == size) |
