From 6c1948e3700f3e46b0ad09f00b7fe7d0a70d3ba5 Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Fri, 31 May 2019 14:08:33 +0000 Subject: [PATCH] FS-11870 [core] fix divide by zero in previous commit --- src/switch_log.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/switch_log.c b/src/switch_log.c index fa0ae6d7c5..055298915c 100644 --- a/src/switch_log.c +++ b/src/switch_log.c @@ -109,9 +109,8 @@ SWITCH_DECLARE(cJSON *) switch_log_node_to_json(const switch_log_node_t *node, i } if (json_format->timestamp.name) { double timestamp = node->timestamp; - double divisor = 0.0; if (json_format->timestamp_divisor > 1.0) { - timestamp = timestamp / divisor; + timestamp = timestamp / json_format->timestamp_divisor; } cJSON_AddItemToObject(json, json_format->timestamp.name, cJSON_CreateNumber(timestamp)); }