[Asterisk-cvs] asterisk/stdtime localtime.c,1.3,1.4

markster at lists.digium.com markster at lists.digium.com
Fri Sep 26 21:44:30 CDT 2003


Update of /usr/cvsroot/asterisk/stdtime
In directory mongoose.digium.com:/tmp/cvs-serv19473/stdtime

Modified Files:
	localtime.c 
Log Message:
Fix various compiler warnings (bug #322)


Index: localtime.c
===================================================================
RCS file: /usr/cvsroot/asterisk/stdtime/localtime.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- localtime.c	21 Sep 2003 15:23:54 -0000	1.3
+++ localtime.c	27 Sep 2003 02:45:37 -0000	1.4
@@ -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 @@
 #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 @@
 		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 @@
 				/* 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;




More information about the svn-commits mailing list