From a951a70fdab6b431ce20a2ff7f2a1a0916975d08 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 5 May 2017 11:07:48 +0200 Subject: [PATCH] src/liboping.c: Fix debugging statement. The dprintf() macro referred to a variable which no longer exists, which only surfaced when compiling with --enable-debug. --- src/liboping.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/liboping.c b/src/liboping.c index fd6e942..117cbfa 100644 --- a/src/liboping.c +++ b/src/liboping.c @@ -1478,9 +1478,10 @@ int ping_send (pingobj_t *obj) if (ping_timeval_sub (&endtime, &nowtime, &timeout) == -1) break; - dprintf ("Waiting on %i sockets for %i.%06i seconds\n", num_fds, - (int) timeout.tv_sec, - (int) timeout.tv_usec); + dprintf ("Waiting on %i sockets for %u.%06u seconds\n", + ((obj->fd4 != -1) ? 1 : 0) + ((obj->fd6 != -1) ? 1 : 0), + (unsigned) timeout.tv_sec, + (unsigned) timeout.tv_usec); int status = select (max_fd + 1, &read_fds, &write_fds, NULL, &timeout); -- 2.30.2