summaryrefslogtreecommitdiffstats
path: root/net/socket/deterministic_socket_data_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket/deterministic_socket_data_unittest.cc')
-rw-r--r--net/socket/deterministic_socket_data_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/socket/deterministic_socket_data_unittest.cc b/net/socket/deterministic_socket_data_unittest.cc
index 199dd0b..5e25aa0 100644
--- a/net/socket/deterministic_socket_data_unittest.cc
+++ b/net/socket/deterministic_socket_data_unittest.cc
@@ -131,7 +131,7 @@ void DeterministicSocketDataTest::AssertReadBufferEquals(const char* data,
void DeterministicSocketDataTest::AssertSyncWriteEquals(const char* data,
int len) {
- scoped_refptr<IOBuffer> buf = new IOBuffer(len);
+ scoped_refptr<IOBuffer> buf(new IOBuffer(len));
memcpy(buf->data(), data, len);
// Issue the write, which will complete immediately
@@ -152,7 +152,7 @@ void DeterministicSocketDataTest::AssertAsyncWriteEquals(const char* data,
void DeterministicSocketDataTest::AssertWriteReturns(const char* data,
int len, int rv) {
- scoped_refptr<IOBuffer> buf = new IOBuffer(len);
+ scoped_refptr<IOBuffer> buf(new IOBuffer(len));
memcpy(buf->data(), data, len);
// Issue the read, which will complete asynchronously