diff options
author | Joey Hess <joey@kitenet.net> | 2011-07-15 12:47:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-07-15 12:47:14 -0400 |
commit | 6c396a256c93464d726c66a95132536941871ee8 (patch) | |
tree | 7f934c9eae22a9cfd3fb1672ebd7bf6870439c81 /Touch.hsc | |
parent | 185f0b687081f47d059cc0503f4f6b671868f753 (diff) |
finished hlint pass
Diffstat (limited to 'Touch.hsc')
-rw-r--r-- | Touch.hsc | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -15,6 +15,7 @@ module Touch ( import Foreign import Foreign.C +import Control.Monad (when) newtype TimeSpec = TimeSpec CTime @@ -66,9 +67,7 @@ touchBoth file atime mtime follow = withCString file $ \f -> do pokeArray ptr [atime, mtime] r <- c_utimensat at_fdcwd f ptr flags - if (r /= 0) - then throwErrno "touchBoth" - else return () + when (r /= 0) $ throwErrno "touchBoth" where flags = if follow then 0 |