Fix warnings hlint 1.8.43 complained about
authorThomas Thrainer <thomasth@google.com>
Wed, 17 Apr 2013 13:21:32 +0000 (15:21 +0200)
committerHelga Velroyen <helgav@google.com>
Wed, 17 Apr 2013 19:29:17 +0000 (21:29 +0200)
These lines are ok according to previous versions of hlint but trigger
an error with version 1.8.43.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

src/Ganeti/Curl/Multi.hs
src/Ganeti/HTools/Program/Hscan.hs

index 6f08a00..d096502 100644 (file)
@@ -191,7 +191,7 @@ makeEasyHandle (f, e, (opts, url)) = do
 execMultiCall :: [([CurlOption], String)] -> IO [(CurlCode, String)]
 execMultiCall ous = do
   -- error buffers
-  errorbufs <- mapM (\_ -> mallocErrorBuffer) ous
+  errorbufs <- mapM (const mallocErrorBuffer) ous
   -- result buffers
   outbufs <- mapM (\_ -> newIORef []) ous
   -- handles
index 38829cd..ddc811a 100644 (file)
@@ -159,4 +159,4 @@ main opts clusters = do
 
   results <- mapM (\name -> Rapi.loadData name >>= writeData nlen name opts)
              clusters
-  unless (all id results) $ exitWith (ExitFailure 2)
+  unless (and results) $ exitWith (ExitFailure 2)