mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-04 06:36:09 +00:00
Remove tautological conditional
If pattern is null we're setting it to a non-null value, so this branch will always be taken. Use `git diff -w` or `git log -p -w` to see what's going on in this commit.
This commit is contained in:
parent
1a71cf886e
commit
f83d6770ff
@ -177,6 +177,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro_event(switch_core_sessio
|
||||
const char *do_break = switch_xml_attr_soft(input, "break_on_match");
|
||||
char *field_expanded = NULL;
|
||||
char *field_expanded_alloc = NULL;
|
||||
switch_regex_t *re = NULL;
|
||||
int proceed = 0, ovector[100];
|
||||
switch_xml_t match = NULL;
|
||||
|
||||
searched = 1;
|
||||
if (!field) {
|
||||
@ -199,11 +202,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro_event(switch_core_sessio
|
||||
pattern = ".*";
|
||||
}
|
||||
|
||||
if (pattern) {
|
||||
switch_regex_t *re = NULL;
|
||||
int proceed = 0, ovector[100];
|
||||
switch_xml_t match = NULL;
|
||||
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
|
||||
if ((proceed = switch_regex_perform(field_expanded, pattern, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
@ -315,7 +313,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro_event(switch_core_sessio
|
||||
switch_ivr_sleep(session, pause, SWITCH_FALSE, NULL);
|
||||
switch_safe_free(expanded);
|
||||
switch_safe_free(substituted);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -325,8 +322,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro_event(switch_core_sessio
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
switch_safe_free(field_expanded_alloc);
|
||||
|
||||
if (status != SWITCH_STATUS_SUCCESS) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user