From: Guus Sliepen Date: Sun, 9 Oct 2016 13:16:42 +0000 (+0200) Subject: Fix compiler warnings about format string errors on BSD. X-Git-Tag: release-1.0.29~1 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=152ef16e5a610a59a7350a9b194c80f156fe084d;p=tinc Fix compiler warnings about format string errors on BSD. --- diff --git a/src/net.c b/src/net.c index 06351bfc..b82dae80 100644 --- a/src/net.c +++ b/src/net.c @@ -246,7 +246,7 @@ static void check_dead_connections(void) { if(c->status.active) { if(c->status.pinged) { ifdebug(CONNECTIONS) logger(LOG_INFO, "%s (%s) didn't respond to PING in %ld seconds", - c->name, c->hostname, (long)now - c->last_ping_time); + c->name, c->hostname, (long)(now - c->last_ping_time)); c->status.timeout = true; terminate_connection(c, true); } else if(c->last_ping_time + pinginterval <= now) { @@ -275,7 +275,7 @@ static void check_dead_connections(void) { if(c->status.active) { ifdebug(CONNECTIONS) logger(LOG_INFO, "%s (%s) could not flush for %ld seconds (%d bytes remaining)", - c->name, c->hostname, (long)now - c->last_flushed_time, c->outbuflen); + c->name, c->hostname, (long)(now - c->last_flushed_time), c->outbuflen); c->status.timeout = true; terminate_connection(c, true); }