From 26a43982bf3b705770603828043a92663e8dc280 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 11 Jul 2018 23:59:45 +0200 Subject: fix div by zero --- src/core/test_core_api_reliability.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core/test_core_api_reliability.c') diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index 4cc5b4bcd..c7c71f1f1 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c @@ -11,7 +11,7 @@ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ @@ -143,6 +143,8 @@ do_shutdown (void *cls) unsigned long long delta; delta = GNUNET_TIME_absolute_get_duration (start_time).rel_value_us; + if (0 == delta) + delta = 1; FPRINTF (stderr, "\nThroughput was %llu kb/s\n", total_bytes * 1000000LL / 1024 / delta); -- cgit v1.2.3