summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-08-02 03:38:31 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-08-02 03:38:31 +0200
commite63fe3b8d058bed15d65728f8e9a7e4093040028 (patch)
treecffb5ac5bef221fdf9612ed82b17dd76a4ddcd04 /src/peer.c
parent546ac7936340312cf272969ff83317ae4d50d2b4 (diff)
downloadfastd-e63fe3b8d058bed15d65728f8e9a7e4093040028.tar
fastd-e63fe3b8d058bed15d65728f8e9a7e4093040028.zip
Don't use exponential notation for integers
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/peer.c b/src/peer.c
index 8ff40dc..53b9f64 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -261,11 +261,11 @@ void fastd_peer_schedule_handshake(fastd_peer_t *peer, int delay) {
peer->next_handshake = ctx.now;
peer->next_handshake.tv_sec += delay/1000;
- peer->next_handshake.tv_nsec += (delay%1000)*1e6;
+ peer->next_handshake.tv_nsec += (delay%1000)*1000000;
- if (peer->next_handshake.tv_nsec > 1e9) {
+ if (peer->next_handshake.tv_nsec > 1000000000) {
peer->next_handshake.tv_sec++;
- peer->next_handshake.tv_nsec -= 1e9;
+ peer->next_handshake.tv_nsec -= 1000000000;
}
fastd_dlist_head_t *list;