summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-06-10 23:50:00 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-06-10 23:50:00 +0200
commit3990796bbb2a122f7f25ca1a399928c9197e5174 (patch)
tree8d68ef5b7073e3dabdcdb5b8c0e88dd444ff3651
parentecdd39d3d31551af855feb1e1ad668b872fe1180 (diff)
taia: minor: small cleanup and comment
Put a comment there explaining why we randomize atto. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
-rw-r--r--taia.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/taia.h b/taia.h
index 7440418..5d79cb3 100644
--- a/taia.h
+++ b/taia.h
@@ -96,7 +96,9 @@ static inline void taia_unpack(unsigned char *s, struct taia *t)
t->nano = x;
}
-#define tai_unix(t, u) ((void) ((t)->x = 4611686018427387914ULL + (uint64_t) (u)))
+#define tai_unix(t, u) \
+ ((void) ((t)->x = 4611686018427387914ULL + \
+ (uint64_t) (u)))
static inline void taia_now(struct taia *t)
{
@@ -106,6 +108,7 @@ static inline void taia_now(struct taia *t)
tai_unix(&t->sec, now.tv_sec);
t->nano = 1000 * now.tv_usec + 500;
+ /* We don't really have it, but bring some noise in. */
t->atto = secrand();
}