Skip to content

Commit

Permalink
Cleanup stale use of deprecated SbMemoryCompare (#1960)
Browse files Browse the repository at this point in the history
b/302332972

Change-Id: I416e63943589d2ea210748b2710172f5e3b10aa5
  • Loading branch information
y4vor committed Nov 13, 2023
1 parent c3e9811 commit 4cbc246
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion base/files/file_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ bool ContentsEqual(const FilePath& filename1, const FilePath& filename2) {
file2.read(buffer2, BUFFER_SIZE);

if ((file1.eof() != file2.eof()) || (file1.gcount() != file2.gcount()) ||
(SbMemoryCompare(buffer1, buffer2,
(memcmp(buffer1, buffer2,
static_cast<size_t>(file1.gcount())))) {
file1.close();
file2.close();
Expand Down
2 changes: 1 addition & 1 deletion base/memory/shared_memory_region_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ TYPED_TEST(SharedMemoryRegionTest, SerializeAndDeserialize) {

// Verify that the second mapping reflects changes in the first.
memset(this->rw_mapping_.memory(), '#', kRegionSize);
EXPECT_EQ(SbMemoryCompare(this->rw_mapping_.memory(), mapping.memory(),
EXPECT_EQ(memcmp(this->rw_mapping_.memory(), mapping.memory(),
kRegionSize),
0);
}
Expand Down

0 comments on commit 4cbc246

Please sign in to comment.