From: Chris Rienzo Date: Fri, 31 May 2019 14:08:33 +0000 (+0000) Subject: FS-11870 [core] fix divide by zero in previous commit X-Git-Tag: v1.10.0~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c1948e3700f3e46b0ad09f00b7fe7d0a70d3ba5;p=thirdparty%2Ffreeswitch.git FS-11870 [core] fix divide by zero in previous commit --- 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)); }