1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

Minor code simplification.

llvm-svn: 104959
This commit is contained in:
Dan Gohman 2010-05-28 16:50:23 +00:00
parent 1c7843bad9
commit 6e97d8955f

View File

@ -427,10 +427,9 @@ raw_fd_ostream::~raw_fd_ostream() {
void raw_fd_ostream::write_impl(const char *Ptr, size_t Size) {
assert(FD >= 0 && "File already closed.");
pos += Size;
ssize_t ret;
do {
ret = ::write(FD, Ptr, Size);
ssize_t ret = ::write(FD, Ptr, Size);
if (ret < 0) {
// If it's a recoverable error, swallow it and retry the write.