$NetBSD: patch-aj,v 1.2 2009/02/11 08:06:17 obache Exp $

--- send.c.orig	2003-08-01 14:53:08.000000000 +0000
+++ send.c
@@ -79,9 +79,17 @@ void send_packet (int signal_id)
 	else			send_tcp();
 
 	sent_pkt++;
-	Signal(SIGALRM, send_packet);
 
-	if (count != -1 && count == sent_pkt) { /* count reached? */
+	if (opt_flood) {
+		if (count != -1 && count <= sent_pkt) { /* count reached? */
+			print_statistics(0);
+		}
+		errno = errno_save;
+		return;
+	}
+
+	Signal(SIGALRM, send_packet);
+	if (count != -1 && count <= sent_pkt) { /* count reached? */
 		Signal(SIGALRM, print_statistics);
 		alarm(COUNTREACHED_TIMEOUT);
 	} else if (!opt_listenmode) {
