summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 01babf5..753ef04 100644
--- a/src/main.c
+++ b/src/main.c
@@ -471,7 +471,7 @@ int main(int argc, char *argv[])
syslog(LOG_INFO, "Done in %lu.%06lu seconds (%lu Mbytes/second). "
"Direct from server: %u Redirected: %u\n",
tv.tv_sec, tv.tv_usec,
- data_len / 1024000 / tv.tv_sec,
+ tv.tv_sec > 0 ? data_len / 1024000 / tv.tv_sec : data_len / 1024000,
tip_client_stats.direct_from_server,
tip_client_stats.redirects);
return EXIT_SUCCESS;
@@ -481,7 +481,7 @@ int main(int argc, char *argv[])
syslog(LOG_INFO, "Failure after %lu.%06lu seconds (%lu Mbytes/second). "
"Direct from server: %u Redirected: %u\n",
tv.tv_sec, tv.tv_usec,
- data_len / 1024000 / tv.tv_sec,
+ tv.tv_sec > 0 ? data_len / 1024000 / tv.tv_sec : data_len / 1024000,
tip_client_stats.direct_from_server,
tip_client_stats.redirects);
return EXIT_FAILURE;