aboutsummaryrefslogtreecommitdiffstats
path: root/say.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-12 14:58:25 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-12 14:58:25 +0000
commitb6bb53ac707e12171be53d05e2a5554a7984d23b (patch)
tree39ff676fafbce2f271509b2fa3f5dd1efa6e97d3 /say.c
parent4bc2bc78bfedec86520c4780683df23e1fac1003 (diff)
don't declare variables inside a code block (bug #4681)
fix formatting git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6104 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'say.c')
-rwxr-xr-xsay.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/say.c b/say.c
index 76dba3986..4ea7595e9 100755
--- a/say.c
+++ b/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
* (weekday), or "date" */
{
- char todo='q';/* The letter to format*/
- if (format[offset] == 'Q') {
- todo='Q';
- }
struct timeval now;
struct tm tmnow;
time_t beg_today;
+ char todo = format[offset]; /* The letter to format*/
gettimeofday(&now,NULL);
ast_localtime(&now.tv_sec,&tmnow,timezone);
@@ -3635,9 +3632,9 @@ int ast_say_date_with_format_he(struct ast_channel *chan, time_t time,
/* Today */
if (todo == 'Q') {
res = wait_file(chan,
- ints,
- "digits/today",
- lang);
+ ints,
+ "digits/today",
+ lang);
}
} else if (beg_today - 86400 < time) {
/* Yesterday */
@@ -3646,13 +3643,13 @@ int ast_say_date_with_format_he(struct ast_channel *chan, time_t time,
(beg_today - 86400 * 6 < time))
{
/* Within the last week */
- res = ast_say_date_with_format_he(
- chan, time, ints, lang,
- "A", timezone);
+ res = ast_say_date_with_format_he(chan,
+ time, ints, lang,
+ "A", timezone);
} else {
- res = ast_say_date_with_format_he(
- chan, time, ints, lang,
- IL_DATE_STR, timezone);
+ res = ast_say_date_with_format_he(chan,
+ time, ints, lang,
+ IL_DATE_STR, timezone);
}
}
break;