From 3ccd6fe4c21d333d4798da519fe3c7bf83a5c99f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 30 Aug 2016 13:53:18 -0400 Subject: fence post --- ExpensiveHash.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ExpensiveHash.hs') diff --git a/ExpensiveHash.hs b/ExpensiveHash.hs index 5799d83..6d1e6c8 100644 --- a/ExpensiveHash.hs +++ b/ExpensiveHash.hs @@ -77,7 +77,7 @@ getNumCores :: IO Integer getNumCores = getmax . mapMaybe parse . lines <$> readFile "/proc/cpuinfo" where getmax [] = error "Unknown number of physical cores." - getmax l = maximum l + getmax l = maximum l + 1 -- add 1 because /proc/cpuinfo counts from 0 parse l | "core id" `isPrefixOf` l = readMaybe $ dropWhile (/= ':') l | otherwise = Nothing -- cgit v1.2.3