From: Dragos Oancea Date: Fri, 31 Jan 2020 15:07:02 +0000 (+0000) Subject: [core] scan-build: Value stored to 'timeout' is never read - switch_ivr_park() X-Git-Tag: v1.10.3^2~223^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F287%2Fhead;p=thirdparty%2Ffreeswitch.git [core] scan-build: Value stored to 'timeout' is never read - switch_ivr_park() --- diff --git a/src/switch_ivr.c b/src/switch_ivr.c index a5b7d341db..2c597fae0e 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -989,9 +989,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session, timeout_cause = switch_channel_str2cause(cause_str + 1); } - if ((timeout = atoi(to)) < 0) { - timeout = 0; - } else { + if ((timeout = atoi(to)) >= 0) { expires = switch_epoch_time_now(NULL) + timeout; } switch_channel_set_variable(channel, "park_timeout", NULL);