mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 03:18:30 +00:00
don't declare variables inside a code block (bug #4681)
fix formatting git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
13
say.c
13
say.c
@@ -3618,13 +3618,10 @@ int ast_say_date_with_format_he(struct ast_channel *chan, time_t time,
|
|||||||
/* Shorthand for "" (today), "Yesterday", A
|
/* Shorthand for "" (today), "Yesterday", A
|
||||||
* (weekday), or "date" */
|
* (weekday), or "date" */
|
||||||
{
|
{
|
||||||
char todo='q';/* The letter to format*/
|
|
||||||
if (format[offset] == 'Q') {
|
|
||||||
todo='Q';
|
|
||||||
}
|
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
struct tm tmnow;
|
struct tm tmnow;
|
||||||
time_t beg_today;
|
time_t beg_today;
|
||||||
|
char todo = format[offset]; /* The letter to format*/
|
||||||
|
|
||||||
gettimeofday(&now,NULL);
|
gettimeofday(&now,NULL);
|
||||||
ast_localtime(&now.tv_sec,&tmnow,timezone);
|
ast_localtime(&now.tv_sec,&tmnow,timezone);
|
||||||
@@ -3646,12 +3643,12 @@ int ast_say_date_with_format_he(struct ast_channel *chan, time_t time,
|
|||||||
(beg_today - 86400 * 6 < time))
|
(beg_today - 86400 * 6 < time))
|
||||||
{
|
{
|
||||||
/* Within the last week */
|
/* Within the last week */
|
||||||
res = ast_say_date_with_format_he(
|
res = ast_say_date_with_format_he(chan,
|
||||||
chan, time, ints, lang,
|
time, ints, lang,
|
||||||
"A", timezone);
|
"A", timezone);
|
||||||
} else {
|
} else {
|
||||||
res = ast_say_date_with_format_he(
|
res = ast_say_date_with_format_he(chan,
|
||||||
chan, time, ints, lang,
|
time, ints, lang,
|
||||||
IL_DATE_STR, timezone);
|
IL_DATE_STR, timezone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user