diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/say.c | 16 | ||||
-rw-r--r-- | main/stdtime/localtime.c | 11 |
2 files changed, 15 insertions, 12 deletions
diff --git a/main/say.c b/main/say.c index e4e374329..9f6f1eacb 100644 --- a/main/say.c +++ b/main/say.c @@ -5774,13 +5774,14 @@ int ast_say_date_with_format_it(struct ast_channel *chan, time_t t, const char * case 'I': case 'l': /* 12-Hour */ - if (tm.tm_hour == 0) + if (tm.tm_hour == 0) { ast_copy_string(nextmsg, "digits/12", sizeof(nextmsg)); - else if (tm.tm_hour > 12) + } else if (tm.tm_hour > 12) { snprintf(nextmsg, sizeof(nextmsg), "digits/%d", tm.tm_hour - 12); - else + } else { snprintf(nextmsg, sizeof(nextmsg), "digits/%d", tm.tm_hour); - res = wait_file(chan, ints, nextmsg, lang); + } + res = wait_file(chan, ints, nextmsg, lang); break; case 'H': case 'k': @@ -5800,11 +5801,12 @@ int ast_say_date_with_format_it(struct ast_channel *chan, time_t t, const char * case 'P': case 'p': /* AM/PM */ - if (tm.tm_hour > 11) + if (tm.tm_hour > 11) { ast_copy_string(nextmsg, "digits/p-m", sizeof(nextmsg)); - else + } else { ast_copy_string(nextmsg, "digits/a-m", sizeof(nextmsg)); - res = wait_file(chan, ints, nextmsg, lang); + } + res = wait_file(chan, ints, nextmsg, lang); break; case 'Q': /* Shorthand for "Today", "Yesterday", or ABdY */ diff --git a/main/stdtime/localtime.c b/main/stdtime/localtime.c index c10b7af62..c946c5fa8 100644 --- a/main/stdtime/localtime.c +++ b/main/stdtime/localtime.c @@ -1849,13 +1849,14 @@ void ast_get_dst_info(const time_t * const timep, int *dst_enabled, time_t *dst_ *dst_enabled = 0; /* Find where I can get gmtoff */ i = 0; - while (sp->ttis[i].tt_isdst) + while (sp->ttis[i].tt_isdst) { if (++i >= sp->typecnt) { - i = 0; - break; + i = 0; + break; } - *gmt_off = sp->ttis[i].tt_gmtoff; - return; + } + *gmt_off = sp->ttis[i].tt_gmtoff; + return; } for (i = 1; i < sp->timecnt; ++i) { |