[Core] Fix dead nested assignments

This commit is contained in:
Andrey Volk
2022-01-11 19:16:53 +03:00
parent 1499acac9d
commit 56b6e954cf
21 changed files with 49 additions and 77 deletions
+1 -3
View File
@@ -3191,12 +3191,11 @@ SWITCH_DECLARE(switch_status_t) switch_say_file_handle_create(switch_say_file_ha
SWITCH_DECLARE(void) switch_say_file(switch_say_file_handle_t *sh, const char *fmt, ...)
{
char buf[256] = "";
int ret;
va_list ap;
va_start(ap, fmt);
if ((ret = switch_vsnprintf(buf, sizeof(buf), fmt, ap)) > 0) {
if (switch_vsnprintf(buf, sizeof(buf), fmt, ap) > 0) {
if (!sh->cnt++) {
sh->stream.write_function(&sh->stream, "file_string://%s.%s", buf, sh->ext);
} else if (strstr(buf, "://")) {
@@ -3204,7 +3203,6 @@ SWITCH_DECLARE(void) switch_say_file(switch_say_file_handle_t *sh, const char *f
} else {
sh->stream.write_function(&sh->stream, "!%s.%s", buf, sh->ext);
}
}
va_end(ap);