diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-30 13:53:18 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-30 13:53:18 -0400 |
commit | 3ccd6fe4c21d333d4798da519fe3c7bf83a5c99f (patch) | |
tree | f4b8160d6fd1f898a9085270bd67c382adefa38e /ExpensiveHash.hs | |
parent | fb2f7b13b9035cbb3312678b4a8d7d883db64b9b (diff) | |
download | keysafe-3ccd6fe4c21d333d4798da519fe3c7bf83a5c99f.tar.gz |
fence post
Diffstat (limited to 'ExpensiveHash.hs')
-rw-r--r-- | ExpensiveHash.hs | 2 |
1 files changed, 1 insertions, 1 deletions
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 |