diff options
author | irungentoo <irungentoo@gmail.com> | 2013-08-05 20:35:47 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-08-05 20:35:47 -0400 |
commit | 524cf1895413026f528d9c59d16755a066c56f1c (patch) | |
tree | 42b4bdc2e23430df593efecebf1afe50c026eec9 /core/util.c | |
parent | c9a597b794291492a6ac5251119615951b5b2f5d (diff) |
Fixed style and is_pinging().
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 | } |