aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/ping.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/networking/ping.c b/networking/ping.c
index bbf9f0db1..ea4fa364b 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -471,17 +471,16 @@ static void sendping_tail(void (*sp)(int), int size_pkt)
{
int sz;
- CLR((uint16_t)G.ntransmitted % MAX_DUP_CHK);
- G.ntransmitted++;
-
- size_pkt += datalen;
-
if (G.deadline_us) {
unsigned n = G.cur_us - G.deadline_us;
if ((int)n >= 0)
print_stats_and_exit(0);
}
+ CLR((uint16_t)G.ntransmitted % MAX_DUP_CHK);
+ G.ntransmitted++;
+ size_pkt += datalen;
+
/* sizeof(pingaddr) can be larger than real sa size, but I think
* it doesn't matter */
sz = xsendto(pingsock, G.snd_packet, size_pkt, &pingaddr.sa, sizeof(pingaddr));