Fix compiler warnings on *BSD.
[tinc] / src / net.c
index 4369ff4..8cb7ed7 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -209,7 +209,7 @@ static void timeout_handler(void *data) {
 
                // timeout during ping
                if(c->status.pinged) {
-                       logger(DEBUG_CONNECTIONS, LOG_INFO, "%s (%s) didn't respond to PING in %ld seconds", c->name, c->hostname, (long)now.tv_sec - c->last_ping_time);
+                       logger(DEBUG_CONNECTIONS, LOG_INFO, "%s (%s) didn't respond to PING in %ld seconds", c->name, c->hostname, (long)(now.tv_sec - c->last_ping_time));
                        terminate_connection(c, c->edge);
                        continue;
                }