From d9b24473ce65c6ce7f5bdea8c7d6eee07a62461e Mon Sep 17 00:00:00 2001 From: Reto Hablützel Date: Sat, 9 Aug 2014 21:33:10 +0200 Subject: hlint refactorings --- src/Plugins/Monitors/Swap.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Plugins/Monitors/Swap.hs') diff --git a/src/Plugins/Monitors/Swap.hs b/src/Plugins/Monitors/Swap.hs index 107eb1e..b6c5019 100644 --- a/src/Plugins/Monitors/Swap.hs +++ b/src/Plugins/Monitors/Swap.hs @@ -33,8 +33,8 @@ parseMEM = | l /= [] = head l !! i | otherwise = B.empty fs s l - | l == [] = False - | otherwise = head l == B.pack s + | null l = False + | otherwise = head l == B.pack s get_data s = flip (/) 1024 . read . B.unpack . li 1 . filter (fs s) st = map B.words . B.lines $ file tot = get_data "SwapTotal:" st -- cgit v1.2.3