From 152ef16e5a610a59a7350a9b194c80f156fe084d Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 9 Oct 2016 15:16:42 +0200 Subject: [PATCH] Fix compiler warnings about format string errors on BSD. --- src/net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.20.1