From 486fb3c09873501b20cf27b0e6546054a7ecef52 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Wed, 10 Jun 2015 16:06:52 +0200 Subject: [PATCH] paranoia: ensure we never divide by 0 althrough logic should prevent that --- src/main.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 4ea7634..10c4e8a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -257,7 +257,7 @@ DelayMap calc_pinger_delays(const HostList &hosts) // --> distribute evenly delay_shifts[interval_and_count.first] = boost::numeric_cast(interval_and_count.first) / - interval_and_count.second; + std:max(1.0f, interval_and_count.second); // max is paranoid } } -- 1.7.1