diff options
author | chirantan <chirantan@chromium.org> | 2014-10-07 16:15:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-07 23:15:48 +0000 |
commit | 75ea2fdb5c87f133a8e1b8da16f6091fb7d5321e (patch) | |
tree | 45416a4fcb4d264015b23e835e39ee1dab82c722 /third_party/zlib | |
parent | b247579e8a2339c59884aa4b5ef3dcb00d9aa9f8 (diff) | |
download | chromium_src-75ea2fdb5c87f133a8e1b8da16f6091fb7d5321e.zip chromium_src-75ea2fdb5c87f133a8e1b8da16f6091fb7d5321e.tar.gz chromium_src-75ea2fdb5c87f133a8e1b8da16f6091fb7d5321e.tar.bz2 |
Refactor AppendToFile and WriteFileDescriptor
- Unify the behavior of the windows and posix implementations of these
functions.
- Simplify the interface by having them just indicate success or failure
instead of making callers deal with partial writes.
BUG=418837
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Review URL: https://codereview.chromium.org/614893004
Cr-Commit-Position: refs/heads/master@{#298604}
Diffstat (limited to 'third_party/zlib')
-rw-r--r-- | third_party/zlib/google/zip_reader.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/third_party/zlib/google/zip_reader.cc b/third_party/zlib/google/zip_reader.cc index 80b60b3..339eb11 100644 --- a/third_party/zlib/google/zip_reader.cc +++ b/third_party/zlib/google/zip_reader.cc @@ -331,8 +331,7 @@ bool ZipReader::ExtractCurrentEntryToFd(const int fd) { break; } else if (num_bytes_read > 0) { // Some data is read. Write it to the output file descriptor. - if (num_bytes_read != - base::WriteFileDescriptor(fd, buf, num_bytes_read)) { + if (!base::WriteFileDescriptor(fd, buf, num_bytes_read)) { success = false; break; } |