Revision 0c76f280
b/htools/Ganeti/HTools/Program/Hbal.hs | ||
---|---|---|
328 | 328 |
"Initial check done: %d bad nodes, %d bad instances.\n" |
329 | 329 |
(length bad_nodes) (length bad_instances) |
330 | 330 |
|
331 |
when (length bad_nodes > 0) $
|
|
331 |
when (not (null bad_nodes)) $
|
|
332 | 332 |
putStrLn "Cluster is not N+1 happy, continuing but no guarantee \ |
333 | 333 |
\that the cluster will end N+1 happy." |
334 | 334 |
|
b/htools/lint-hints.hs | ||
---|---|---|
4 | 4 |
where _ = notIn v x |
5 | 5 |
warn = map (\v -> (x, v)) ==> zip (repeat x) |
6 | 6 |
where _ = notIn v x |
7 |
|
|
8 |
-- The following warn on use of length instead of null |
|
9 |
warn = length x > 0 ==> not (null x) |
|
10 |
warn = length x /= 0 ==> not (null x) |
|
11 |
warn = length x == 0 ==> null x |
Also available in: Unified diff