From: Florian Forster Date: Fri, 5 May 2017 09:07:48 +0000 (+0200) Subject: src/liboping.c: Fix debugging statement. X-Git-Url: https://git.octo.it/?p=liboping.git;a=commitdiff_plain;h=a951a70fdab6b431ce20a2ff7f2a1a0916975d08 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. --- 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);