diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-12-22 00:39:18 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-12-22 00:39:18 +0100 |
commit | c50207a47e1d6a42d2d71bc5ca0468162673036b (patch) | |
tree | 296d58de4a95ae4bb9bc7b221617b00f8e8521db /src/Plugins/Monitors/MultiCpu.hs | |
parent | 899a31dbdbe3d49f80443e90fbc26f94fa1f72ba (diff) | |
download | xmobar-c50207a47e1d6a42d2d71bc5ca0468162673036b.tar.gz xmobar-c50207a47e1d6a42d2d71bc5ca0468162673036b.tar.bz2 |
Bug fix: infinite loop in MultiCpu
I've been mistakenly blaming Top of an infinite loop after awake; as
it comes, the culprit was MultiCpu, because of a recent change
whereby, on the absence of cpu lines, we were generating an infinite
list of empty fields.
Diffstat (limited to 'src/Plugins/Monitors/MultiCpu.hs')
-rw-r--r-- | src/Plugins/Monitors/MultiCpu.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Plugins/Monitors/MultiCpu.hs b/src/Plugins/Monitors/MultiCpu.hs index 535196a..b8c71ca 100644 --- a/src/Plugins/Monitors/MultiCpu.hs +++ b/src/Plugins/Monitors/MultiCpu.hs @@ -50,7 +50,7 @@ percent b a = if tot > 0 then map (/ tot) $ take 4 dif else [0, 0, 0, 0] tot = foldr (+) 0 dif formatMultiCpus :: [[Float]] -> Monitor [String] -formatMultiCpus [] = return $ repeat "" +formatMultiCpus [] = return [] formatMultiCpus xs = fmap concat $ mapM formatCpu xs formatCpu :: [Float] -> Monitor [String] |