From a36220ccfbcd2a2045f70db2d9ec4fecb684af01 Mon Sep 17 00:00:00 2001 From: Aaron Gao Date: Wed, 17 May 2017 18:46:03 -0700 Subject: [PATCH] fix unity test Summary: unity test will fail even if we have the same function names in different anonymous namespaces in different files. Closes https://github.com/facebook/rocksdb/pull/2321 Differential Revision: D5083783 Pulled By: lightmark fbshipit-source-id: 1347aaf866900af30d23cdd4f29c1b96f17352af --- util/file_reader_writer.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/util/file_reader_writer.cc b/util/file_reader_writer.cc index c27047a5b..0e5d40f67 100644 --- a/util/file_reader_writer.cc +++ b/util/file_reader_writer.cc @@ -25,11 +25,9 @@ namespace rocksdb { #ifndef NDEBUG namespace { - -bool IsSectorAligned(const size_t off, size_t sector_size) { +bool IsFileSectorAligned(const size_t off, size_t sector_size) { return off % sector_size == 0; } - } #endif @@ -548,8 +546,8 @@ class ReadaheadRandomAccessFile : public RandomAccessFile { if (n > buffer_.Capacity()) { n = buffer_.Capacity(); } - assert(IsSectorAligned(offset, alignment_)); - assert(IsSectorAligned(n, alignment_)); + assert(IsFileSectorAligned(offset, alignment_)); + assert(IsFileSectorAligned(n, alignment_)); Slice result; Status s = file_->Read(offset, n, &result, buffer_.BufferStart()); if (s.ok()) {