]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for mod_say_en
authorAndrey Volk <andywolk@gmail.com>
Fri, 12 Jul 2019 16:13:06 +0000 (20:13 +0400)
committerAndrey Volk <andywolk@gmail.com>
Mon, 15 Jul 2019 19:41:03 +0000 (23:41 +0400)
src/mod/say/mod_say_en/mod_say_en.c

index 99c2a2b1ff53c235b3c3ceb7945b10432f342fb6..520aa728a0ff47d90f92021733bdd17fc3cdcfc9 100644 (file)
@@ -202,7 +202,7 @@ static switch_status_t en_say_time(switch_say_file_handle_t *sh, char *tosay, sw
                if (strchr(tosay, ':')) {
                        char *tme = strdup(tosay);
                        char *p;
-
+                       switch_assert(tme);
                        if ((p = strrchr(tme, ':'))) {
                                *p++ = '\0';
                                seconds = atoi(p);
@@ -343,10 +343,6 @@ static switch_status_t en_say_time(switch_say_file_handle_t *sh, char *tosay, sw
                        say_dow = 1;
                        break;
                }
-               if (tm.tm_mon != tm_now.tm_mon) {
-                       say_month = say_day = say_dow = 1;
-                       break;
-               }
 
                say_month = say_day = say_dow = 1;