From 048e58cf31f3946867235a3f653a75a081e7170d Mon Sep 17 00:00:00 2001 From: Alja Mrak-Tadel Date: Mon, 31 Oct 2016 14:12:58 -0700 Subject: [PATCH] Additional checks for prefetch statistics. --- src/XrdFileCache/XrdFileCacheInfo.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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());