Index: webrtc/system_wrappers/source/file_impl.cc |
diff --git a/webrtc/system_wrappers/source/file_impl.cc b/webrtc/system_wrappers/source/file_impl.cc |
index 0ee0deab6c1061edb3f475d44a3ff9b7e6f7f51d..ea09661e19d442a81be2576ead48358c7c3bb5ef 100644 |
--- a/webrtc/system_wrappers/source/file_impl.cc |
+++ b/webrtc/system_wrappers/source/file_impl.cc |
@@ -243,8 +243,8 @@ bool FileWrapperImpl::Write(const void* buf, size_t length) { |
} |
size_t num_bytes = fwrite(buf, 1, length, id_); |
- if (num_bytes > 0) { |
- size_in_bytes_ += num_bytes; |
+ size_in_bytes_ += num_bytes; |
Henrik Grunell WebRTC
2016/02/19 15:04:38
Keep this inside the if block below. Not needed if
terelius
2016/02/19 16:50:29
By not closing the file, we can remove the entire
|
+ if (num_bytes == length) { |
Henrik Grunell WebRTC
2016/02/19 15:04:38
The original code is unclear. Good to change this.
terelius
2016/02/19 16:05:52
I agree on 1 and 3. I'd also prefer not closing th
|
return true; |
} |