diff options
author | Jisi Liu <liujisi@google.com> | 2017-12-13 13:28:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-13 13:28:23 -0800 |
commit | 8521624e935925d60204ebecee319f1df7423b71 (patch) | |
tree | 852e8725e4e422cdf64788f841cf2f31eb87874e | |
parent | f69a5db66f170b22b8a5a0abc04ee65d11ef2621 (diff) | |
parent | 6b01e6440cdac325bc131ec6713eab9d8307414a (diff) | |
download | protobuf-8521624e935925d60204ebecee319f1df7423b71.tar.gz protobuf-8521624e935925d60204ebecee319f1df7423b71.tar.bz2 protobuf-8521624e935925d60204ebecee319f1df7423b71.zip |
Merge pull request #4043 from pherl/flush
Explicitly propagate the status of Flush().
-rw-r--r-- | src/google/protobuf/message.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/google/protobuf/message.cc b/src/google/protobuf/message.cc index a0d3feba..42ec0337 100644 --- a/src/google/protobuf/message.cc +++ b/src/google/protobuf/message.cc @@ -170,12 +170,12 @@ size_t Message::SpaceUsedLong() const { bool Message::SerializeToFileDescriptor(int file_descriptor) const { io::FileOutputStream output(file_descriptor); - return SerializeToZeroCopyStream(&output); + return SerializeToZeroCopyStream(&output) && output.Flush(); } bool Message::SerializePartialToFileDescriptor(int file_descriptor) const { io::FileOutputStream output(file_descriptor); - return SerializePartialToZeroCopyStream(&output); + return SerializePartialToZeroCopyStream(&output) && output.Flush(); } bool Message::SerializeToOstream(std::ostream* output) const { |