Skip to content

Commit

Permalink
removed unused variable of type Status, fixed indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jsteemann committed Sep 18, 2015
1 parent 4704833 commit bbb18c8
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions util/env_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -614,19 +614,18 @@ class PosixWritableFile : public WritableFile {
virtual Status Append(const Slice& data) override {
const char* src = data.data();
size_t left = data.size();
Status s;
while (left != 0) {
ssize_t done = write(fd_, src, left);
if (done < 0) {
if (errno == EINTR) {
continue;
}
return IOError(filename_, errno);
while (left != 0) {
ssize_t done = write(fd_, src, left);
if (done < 0) {
if (errno == EINTR) {
continue;
}
left -= done;
src += done;
return IOError(filename_, errno);
}
filesize_ += data.size();
left -= done;
src += done;
}
filesize_ += data.size();
return Status::OK();
}

Expand Down

0 comments on commit bbb18c8

Please sign in to comment.