Revision 712da82f htest/Test/Ganeti/TestCommon.hs

b/htest/Test/Ganeti/TestCommon.hs
245 245
-- | Helper function to compute the number of hosts in a network
246 246
-- given the netmask. (For IPv4 only.)
247 247
netmask2NumHosts :: Int -> Int
248
netmask2NumHosts n = (2::Int)^((32::Int)-n)
248
netmask2NumHosts n = 2^(32-n)
249 249

  
250 250
-- | Generates an arbitrary IPv6 network address in textual form.
251 251
-- The generated address is not simpflified, e. g. an address like

Also available in: Unified diff