diff --git a/src/print.c b/src/print.c index be20a53..d9f3c73 100644 --- a/src/print.c +++ b/src/print.c @@ -48,7 +48,7 @@ void print_statistics(struct statistics const *stats, struct setting const *sett printf("%zu packets transmitted, %zu packets received, %.3f%% packet loss\n", stats->packets_sent, stats->packets_received, - ((double) stats->packets_sent - (stats->packets_sent - stats->packets_received)) * 100 / stats->packets_sent + ((double)(stats->packets_sent - stats->packets_received) / (double)stats->packets_sent) * 100.0 ); }