From a90bb01b260de37d4390af4721960e63095b991c Mon Sep 17 00:00:00 2001 From: "rvargas@google.com" Date: Thu, 12 Feb 2009 02:41:21 +0000 Subject: Fix some purify warnings. Review URL: http://codereview.chromium.org/21284 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9641 0039d316-1c4b-4281-b951-d872f2087c98 --- net/disk_cache/backend_unittest.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'net') diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc index d23ea7f..3c9b166 100644 --- a/net/disk_cache/backend_unittest.cc +++ b/net/disk_cache/backend_unittest.cc @@ -342,6 +342,7 @@ TEST_F(DiskCacheBackendTest, ValidEntry) { const int kSize = 50; scoped_refptr 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 @@ TEST_F(DiskCacheBackendTest, InvalidEntry) { const int kSize = 50; scoped_refptr 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 @@ TEST_F(DiskCacheBackendTest, InvalidEntryRead) { const int kSize = 50; scoped_refptr 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 @@ TEST_F(DiskCacheBackendTest, InvalidEntryEnumeration) { const int kSize = 50; scoped_refptr 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(); -- cgit v1.1