removed unused variable of type Status, fixed indentation
This commit is contained in:
parent
4704833357
commit
bbb18c8278
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user