diff --git a/src/XrdFileCache/XrdFileCacheInfo.hh b/src/XrdFileCache/XrdFileCacheInfo.hh index ad16ae6578f..8b49e5f0486 100644 --- a/src/XrdFileCache/XrdFileCacheInfo.hh +++ b/src/XrdFileCache/XrdFileCacheInfo.hh @@ -265,7 +265,7 @@ inline bool Info::TestBit(int i) const inline bool Info::TestPrefetchBit(int i) const { - if (m_buff_prefetch) return false; + if (!m_buff_prefetch) return false; const int cn = i/8; assert(cn < GetSizeInBytes()); @@ -346,6 +346,8 @@ inline void Info::SetBitWritten(int i) inline void Info::SetBitPrefetch(int i) { + if (!m_buff_prefetch) return; + const int cn = i/8; assert(cn < GetSizeInBytes());