summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/raw_ostream.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-05-28 16:50:23 +0000
committerDan Gohman <gohman@apple.com>2010-05-28 16:50:23 +0000
commitfb85820f9af936051dc4f5b3331fed33c4857610 (patch)
tree0162c8ca918949fbf43c46c4523721a7fa1c2b3e /llvm/lib/Support/raw_ostream.cpp
parentfeaeb36edf2a3d971a9392973b0f30e46284c2d1 (diff)
downloadbcm5719-llvm-fb85820f9af936051dc4f5b3331fed33c4857610.tar.gz
bcm5719-llvm-fb85820f9af936051dc4f5b3331fed33c4857610.zip
Minor code simplification.
llvm-svn: 104959
Diffstat (limited to 'llvm/lib/Support/raw_ostream.cpp')
-rw-r--r--llvm/lib/Support/raw_ostream.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
index 93428f5cf23..bb72dfbecfd 100644
--- a/llvm/lib/Support/raw_ostream.cpp
+++ b/llvm/lib/Support/raw_ostream.cpp
@@ -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.
OpenPOWER on IntegriCloud