[asterisk-commits] rizzo: trunk r72457 - in /trunk: apps/app_sms.c res/res_features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 28 14:02:31 CDT 2007


Author: rizzo
Date: Thu Jun 28 14:02:31 2007
New Revision: 72457

URL: http://svn.digium.com/view/asterisk?view=rev&rev=72457
Log:
move variable declarations to the beginning of a block.
Not applicable to previous branches.


Modified:
    trunk/apps/app_sms.c
    trunk/res/res_features.c

Modified: trunk/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_sms.c?view=diff&rev=72457&r1=72456&r2=72457
==============================================================================
--- trunk/apps/app_sms.c (original)
+++ trunk/apps/app_sms.c Thu Jun 28 14:02:31 2007
@@ -512,11 +512,13 @@
 static void packdate(unsigned char *o, time_t w)
 {
 	struct tm t;
+	int z;
+
 	ast_localtime(&w, &t, NULL);
 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__)
-	int z = -t.tm_gmtoff / 60 / 15;
+	z = -t.tm_gmtoff / 60 / 15;
 #else
-	int z = timezone / 60 / 15;
+	z = timezone / 60 / 15;
 #endif
 	*o++ = ((t.tm_year % 10) << 4) + (t.tm_year % 100) / 10;
 	*o++ = (((t.tm_mon + 1) % 10) << 4) + (t.tm_mon + 1) / 10;

Modified: trunk/res/res_features.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_features.c?view=diff&rev=72457&r1=72456&r2=72457
==============================================================================
--- trunk/res/res_features.c (original)
+++ trunk/res/res_features.c Thu Jun 28 14:02:31 2007
@@ -2838,7 +2838,6 @@
 	AST_RWLIST_WRLOCK(&feature_groups);
 
 	ctg = NULL;
-	struct ast_call_feature *feature;
 	while ((ctg = ast_category_browse(cfg, ctg))) {
 		for (i = 0; i < ARRAY_LEN(categories); i++) {
 			if (!strcasecmp(categories[i], ctg))
@@ -2852,6 +2851,8 @@
 			continue;
 
 		for (var = ast_variable_browse(cfg, ctg); var; var = var->next) {
+			struct ast_call_feature *feature;
+
 			AST_LIST_LOCK(&feature_list);
 			if(!(feature = find_dynamic_feature(var->name)) && 
 			   !(feature = ast_find_call_feature(var->name))) {




More information about the asterisk-commits mailing list