aboutsummaryrefslogtreecommitdiffstats
path: root/stdtime
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-09-27 02:45:37 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-09-27 02:45:37 +0000
commit9870b2521b30fb68be98596cdb8d4bfb62840702 (patch)
tree96fcf03c337e2c22cb66512afb6f102424b0d55e /stdtime
parent9f2fba7fb1d2d024ab4fb67c3adcb24031c1e88e (diff)
Fix various compiler warnings (bug #322)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1570 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'stdtime')
-rwxr-xr-xstdtime/localtime.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/stdtime/localtime.c b/stdtime/localtime.c
index 276eb9f97..84ea38f6b 100755
--- a/stdtime/localtime.c
+++ b/stdtime/localtime.c
@@ -25,11 +25,12 @@
#define TZ_STRLEN_MAX 255
/* #define DEBUG */
#include <asterisk/lock.h>
+#include <asterisk/localtime.h>
#ifndef lint
#ifndef NOID
-static char elsieid[] = "@(#)localtime.c 7.57";
+static const char elsieid[] = "@(#)localtime.c 7.57";
#endif /* !defined NOID */
#endif /* !defined lint */
@@ -45,7 +46,7 @@ static char elsieid[] = "@(#)localtime.c 7.57";
#include <sys/stat.h>
#include "private.h"
#include "tzfile.h"
-#include "fcntl.h"
+#include <fcntl.h>
#ifdef DEBUG
#include <stdio.h>
#endif
@@ -929,7 +930,7 @@ ast_tzset P((const char *name))
cur_state->ttis[0].tt_gmtoff = 0;
cur_state->ttis[0].tt_abbrind = 0;
(void) strcpy(cur_state->chars, gmt);
- } else if (tzload(name, cur_state) != 0)
+ } else if (tzload(name, cur_state) != 0) {
if (name[0] == ':') {
(void) gmtload(cur_state);
} else if (tzparse(name, cur_state, FALSE) != 0) {
@@ -938,6 +939,7 @@ ast_tzset P((const char *name))
/* Last ditch, get GMT */
(void) gmtload(cur_state);
}
+ }
strncpy(cur_state->name,name,sizeof(cur_state->name));
if (last_lclptr)
last_lclptr->next = cur_state;