Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: net/disk_cache/backend_unittest.cc

Issue 21284: Fix some purify warnings. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/backend_unittest.cc
===================================================================
--- net/disk_cache/backend_unittest.cc (revision 9626)
+++ net/disk_cache/backend_unittest.cc (working copy)
@@ -342,6 +342,7 @@
const int kSize = 50;
scoped_refptr<net::IOBuffer> buffer1 = new net::IOBuffer(kSize);
+ memset(buffer1->data(), 0, kSize);
base::strlcpy(buffer1->data(), "And the data to save", kSize);
EXPECT_EQ(kSize, entry1->WriteData(0, 0, buffer1, kSize, NULL, false));
entry1->Close();
@@ -370,6 +371,7 @@
const int kSize = 50;
scoped_refptr<net::IOBuffer> buffer1 = new net::IOBuffer(kSize);
+ memset(buffer1->data(), 0, kSize);
base::strlcpy(buffer1->data(), "And the data to save", kSize);
EXPECT_EQ(kSize, entry1->WriteData(0, 0, buffer1, kSize, NULL, false));
SimulateCrash();
@@ -391,6 +393,7 @@
const int kSize = 50;
scoped_refptr<net::IOBuffer> buffer1 = new net::IOBuffer(kSize);
+ memset(buffer1->data(), 0, kSize);
base::strlcpy(buffer1->data(), "And the data to save", kSize);
EXPECT_EQ(kSize, entry1->WriteData(0, 0, buffer1, kSize, NULL, false));
entry1->Close();
@@ -556,6 +559,7 @@
const int kSize = 50;
scoped_refptr<net::IOBuffer> buffer1 = new net::IOBuffer(kSize);
+ memset(buffer1->data(), 0, kSize);
base::strlcpy(buffer1->data(), "And the data to save", kSize);
EXPECT_EQ(kSize, entry1->WriteData(0, 0, buffer1, kSize, NULL, false));
entry1->Close();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698