summaryrefslogtreecommitdiff
path: root/core/util.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-08-05 20:35:47 -0400
committerirungentoo <irungentoo@gmail.com>2013-08-05 20:35:47 -0400
commit524cf1895413026f528d9c59d16755a066c56f1c (patch)
tree42b4bdc2e23430df593efecebf1afe50c026eec9 /core/util.c
parentc9a597b794291492a6ac5251119615951b5b2f5d (diff)
Fixed style and is_pinging().
Diffstat (limited to 'core/util.c')
-rw-r--r--core/util.c25
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
14uint64_t now() { 14uint64_t now()
15 return time(NULL); 15{
16 return time(NULL);
16} 17}
17 18
18uint64_t random_64b() { 19uint64_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
29bool ipp_eq(IP_Port a, IP_Port b) { 31bool 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}