summaryrefslogtreecommitdiff
path: root/Utility/Touch.hsc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-04-19 00:38:29 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-04-19 00:38:29 -0400
commitc5910fd179d374f644ab3c843b243a51a7df9b24 (patch)
tree9623da2ab0411f3862d415a17be7be567688b714 /Utility/Touch.hsc
parentbf1bf600fc94f6b95d5723473b148b35ab32073d (diff)
removed all uses of undefined from code base
It's a code smell, can lead to hard to diagnose error messages.
Diffstat (limited to 'Utility/Touch.hsc')
-rw-r--r--Utility/Touch.hsc6
1 files changed, 3 insertions, 3 deletions
diff --git a/Utility/Touch.hsc b/Utility/Touch.hsc
index f87bb62d6..c3318e6da 100644
--- a/Utility/Touch.hsc
+++ b/Utility/Touch.hsc
@@ -54,8 +54,8 @@ instance Storable TimeSpec where
-- use the larger alignment of the two types in the struct
alignment _ = max sec_alignment nsec_alignment
where
- sec_alignment = alignment (undefined::CTime)
- nsec_alignment = alignment (undefined::CLong)
+ sec_alignment = alignment (1::CTime)
+ nsec_alignment = alignment (1::CLong)
sizeOf _ = #{size struct timespec}
peek ptr = do
sec <- #{peek struct timespec, tv_sec} ptr
@@ -92,7 +92,7 @@ touchBoth file atime mtime follow =
-}
instance Storable TimeSpec where
- alignment _ = alignment (undefined::CLong)
+ alignment _ = alignment (1::CLong)
sizeOf _ = #{size struct timeval}
peek ptr = do
sec <- #{peek struct timeval, tv_sec} ptr