From 11288c56e42d7ced52e9bf5f4fdfb53c9e5f2822 Mon Sep 17 00:00:00 2001 From: Alja Mrak-Tadel Date: Thu, 8 Oct 2015 15:35:18 -0700 Subject: [PATCH] Fix compilation error from previous commit -- conversion of float to long long. --- src/XrdFileCache/XrdFileCacheFactory.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/XrdFileCache/XrdFileCacheFactory.cc b/src/XrdFileCache/XrdFileCacheFactory.cc index 955b867c4b0..27501beee50 100644 --- a/src/XrdFileCache/XrdFileCacheFactory.cc +++ b/src/XrdFileCache/XrdFileCacheFactory.cc @@ -256,8 +256,8 @@ bool Factory::Config(XrdSysLogger *logger, const char *config_filename, const ch { XrdOssVSInfo sP; if (m_output_fs->StatVS(&sP, "public", 1) >= 0) { - m_configuration.m_diskUsageLWM = 0.90 * sP.Total; - m_configuration.m_diskUsageHWM = 0.95 * sP.Total; + m_configuration.m_diskUsageLWM = static_cast(0.90 * sP.Total + 0.5); + m_configuration.m_diskUsageHWM = static_cast(0.95 * sP.Total + 0.5); clLog()->Debug(XrdCl::AppMsg, "Default disk usage [%lld, %lld]", m_configuration.m_diskUsageLWM, m_configuration.m_diskUsageHWM); } } @@ -345,8 +345,8 @@ bool Factory::ConfigParameters(std::string part, XrdOucStream& config ) return false; } - m_configuration.m_diskUsageLWM = sP.Total * lwmf; - m_configuration.m_diskUsageHWM = sP.Total * hwmf; + m_configuration.m_diskUsageLWM = static_cast(sP.Total * lwmf + 0.5); + m_configuration.m_diskUsageHWM = static_cast(sP.Total * hwmf + 0.5); } } }