diff options
Diffstat (limited to 'core/util.c')
-rw-r--r-- | core/util.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/core/util.c b/core/util.c index 6b40dad7..4ce9271e 100644 --- a/core/util.c +++ b/core/util.c | |||
@@ -11,21 +11,24 @@ | |||
11 | 11 | ||
12 | #include "network.h" | 12 | #include "network.h" |
13 | 13 | ||
14 | uint64_t now() { | 14 | uint64_t now() |
15 | return time(NULL); | 15 | { |
16 | return time(NULL); | ||
16 | } | 17 | } |
17 | 18 | ||
18 | uint64_t random_64b() { | 19 | uint64_t random_64b() |
19 | uint64_t r; | 20 | { |
21 | uint64_t r; | ||
20 | 22 | ||
21 | // This is probably not random enough? | 23 | // This is probably not random enough? |
22 | r = random_int(); | 24 | r = random_int(); |
23 | r <<= 32; | 25 | r <<= 32; |
24 | r |= random_int(); | 26 | r |= random_int(); |
25 | 27 | ||
26 | return r; | 28 | return r; |
27 | } | 29 | } |
28 | 30 | ||
29 | bool ipp_eq(IP_Port a, IP_Port b) { | 31 | bool ipp_eq(IP_Port a, IP_Port b) |
30 | return (a.ip.i == b.ip.i) && (a.port == b.port); | 32 | { |
33 | return (a.ip.i == b.ip.i) && (a.port == b.port); | ||
31 | } | 34 | } |