The following commit has been merged in the next branch: commit 1fbf987d58d83654ddf343df329d53d5f603ee09 Author: Sven Eckelmann sven.eckelmann@gmx.de Date: Thu Nov 4 14:03:42 2010 +0100
batctl: Initialise timeout before usage in error case
Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de
diff --git a/ping.c b/ping.c index 288bd01..1ed8fac 100644 --- a/ping.c +++ b/ping.c @@ -180,6 +180,9 @@ int ping(char *mesh_iface, int argc, char **argv) packet_len, packet_len + 28);
while (!is_aborted) { + tv.tv_sec = timeout; + tv.tv_usec = 0; + if (loop_count == 0) break;
@@ -195,9 +198,6 @@ int ping(char *mesh_iface, int argc, char **argv)
start_timer();
- tv.tv_sec = timeout; - tv.tv_usec = 0; - FD_ZERO(&read_socket); FD_SET(ping_fd, &read_socket);