Chromium Code Reviews| Index: net/base/upload_data_stream.cc |
| diff --git a/net/base/upload_data_stream.cc b/net/base/upload_data_stream.cc |
| index 1f77f062a74f39609c9c5429d32abd15185c57e3..bfec67cc5ec3e9a07aaf77ed8e80f9e0fc22a5dd 100644 |
| --- a/net/base/upload_data_stream.cc |
| +++ b/net/base/upload_data_stream.cc |
| @@ -69,7 +69,8 @@ int UploadDataStream::FillBuf() { |
| size_t bytes_copied = std::min(count, size_remaining); |
| - memcpy(buf_->data() + buf_len_, &d[next_element_offset_], bytes_copied); |
| + if (bytes_copied) |
|
Satish
2011/01/26 22:36:33
This check is required because accessing "d[0]" be
willchan no longer on Chromium
2011/01/27 18:47:49
I wonder if it'd be simpler to do:
if (!bytes_copi
Satish
2011/01/27 20:42:09
Sure could do that.
|
| + memcpy(buf_->data() + buf_len_, &d[next_element_offset_], bytes_copied); |
| buf_len_ += bytes_copied; |
| if (bytes_copied == count) { |