From 7ab7e8bee8f9d839abd4f8119068401bf3d9d7f7 Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Thu, 2 May 2019 23:52:01 +0000 Subject: [PATCH] FS-11785 [mod_httapi] Fix dead assignment and null pointer false positive --- src/mod/applications/mod_httapi/mod_httapi.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/mod/applications/mod_httapi/mod_httapi.c b/src/mod/applications/mod_httapi/mod_httapi.c index 0b15ec5d7d..a2c63703c6 100644 --- a/src/mod/applications/mod_httapi/mod_httapi.c +++ b/src/mod/applications/mod_httapi/mod_httapi.c @@ -955,8 +955,6 @@ static switch_status_t parse_record(const char *tag_name, client_t *client, swit const char *sub_action = NULL; const char *digit_timeout_ = switch_xml_attr(tag, "digit-timeout"); const char *terminators = switch_xml_attr(tag, "terminators"); - char *loops_ = (char *) switch_xml_attr(tag, "loops"); - int loops = 0; switch_status_t status = SWITCH_STATUS_SUCCESS; switch_ivr_dmachine_t *dmachine = NULL; switch_input_args_t *args = NULL, myargs = { 0 }; @@ -991,6 +989,7 @@ static switch_status_t parse_record(const char *tag_name, client_t *client, swit } } + switch_assert(fname != NULL); if ((p = strrchr(fname, '.'))) { *p++ = '\0'; ext = p; @@ -1028,14 +1027,6 @@ static switch_status_t parse_record(const char *tag_name, client_t *client, swit } } - if (loops_) { - loops = atoi(loops_); - - if (loops < 0) { - loops = -1; - } - } - if (digit_timeout_) { tmp = atol(digit_timeout_);