remove unnecessary null check, we would have crashed already if that strdup failed
This commit is contained in:
parent
5c07c3eb03
commit
dbaf49926c
|
@ -243,9 +243,7 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay,
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -208,9 +208,7 @@ static switch_status_t en_say_time(switch_say_file_handle_t *sh, char *tosay, sw
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -237,9 +237,7 @@ static switch_status_t es_say_time(switch_core_session_t *session, char *tosay,
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -242,9 +242,7 @@ static switch_status_t fa_say_time(switch_core_session_t *session, char *tosay,
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -227,9 +227,7 @@ static switch_status_t fr_say_time(switch_core_session_t *session, char *tosay,
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -337,9 +337,7 @@ static switch_status_t he_say_time(switch_say_file_handle_t *sh, char *tosay, sw
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -486,9 +486,7 @@ static switch_status_t hr_say_time(switch_core_session_t *session, char *tosay,
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -205,9 +205,7 @@ static switch_status_t hu_say_time(switch_core_session_t *session, char *tosay,
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -251,9 +251,7 @@ static switch_status_t it_say_time(switch_core_session_t *session, char *tosay,
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -268,9 +268,7 @@ static switch_status_t ja_say_time(switch_core_session_t *session, char *tosay,
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -195,9 +195,7 @@ static switch_status_t nl_say_time(switch_core_session_t *session, char *tosay,
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -228,9 +228,7 @@ static switch_status_t pl_say_time(switch_say_file_handle_t *sh, char *tosay, sw
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
*
|
||||
* Anthony Minessale II <anthm@freeswitch.org>
|
||||
* Michael B. Murdock <mike@mmurdock.org>
|
||||
* António Silva <asilva@wirelessmundi.com>
|
||||
* António Silva <asilva@wirelessmundi.com>
|
||||
*
|
||||
* mod_say_pt.c -- Say for Portuguese
|
||||
*
|
||||
|
@ -184,7 +184,7 @@ static switch_status_t pt_say_general_count(switch_core_session_t *session, char
|
|||
switch (say_args->method) {
|
||||
case SSM_COUNTED:
|
||||
case SSM_PRONOUNCED:
|
||||
/* specific case, one million => um milhão */
|
||||
/* specific case, one million => um milhão */
|
||||
if (!places[8] && !places[7] && (places[6] == 1)) {
|
||||
say_file("digits/1.wav");
|
||||
say_file("digits/million.wav");
|
||||
|
@ -233,9 +233,7 @@ static switch_status_t pt_say_time(switch_core_session_t *session, char *tosay,
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -368,9 +368,7 @@ static switch_status_t ru_say_time(switch_say_file_handle_t *sh, char *tosay, sw
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -274,9 +274,7 @@ static switch_status_t sv_say_time(switch_say_file_handle_t *sh, char *tosay, sw
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -257,9 +257,7 @@ static switch_status_t th_say_time(switch_core_session_t *session, char *tosay,
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
|
@ -221,9 +221,7 @@ static switch_status_t zh_say_time(switch_core_session_t *session, char *tosay,
|
|||
if ((p = strchr(tme, ':'))) {
|
||||
*p++ = '\0';
|
||||
minutes = atoi(p);
|
||||
if (tme) {
|
||||
hours = atoi(tme);
|
||||
}
|
||||
hours = atoi(tme);
|
||||
} else {
|
||||
minutes = atoi(tme);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue