[Asterisk-cvs] asterisk loader.c,1.48,1.49

russell at lists.digium.com russell at lists.digium.com
Mon Jul 25 11:25:23 CDT 2005


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

Modified Files:
	loader.c 
Log Message:
formatting fixes (bug #4770)


Index: loader.c
===================================================================
RCS file: /usr/cvsroot/asterisk/loader.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- loader.c	7 Jul 2005 22:32:20 -0000	1.48
+++ loader.c	25 Jul 2005 15:32:06 -0000	1.49
@@ -43,6 +43,12 @@
 #define RTLD_NOW 0
 #endif
 
+AST_MUTEX_DEFINE_STATIC(modlock);
+AST_MUTEX_DEFINE_STATIC(reloadlock);
+
+static struct module *module_list=NULL;
+static int modlistver = 0;
+
 static char expected_key[] =
 { 0x8e, 0x93, 0x22, 0x83, 0xf5, 0xc3, 0xc0, 0x75,
   0xff, 0x8b, 0xa9, 0xbe, 0x7c, 0x43, 0x74, 0x63 };
@@ -59,13 +65,18 @@
 	struct module *next;
 };
 
+static struct loadupdate {
+	int (*updater)(void);
+	struct loadupdate *next;
+} *updaters = NULL;
+
 static int printdigest(unsigned char *d)
 {
 	int x;
 	char buf[256];
 	char buf2[16];
 	snprintf(buf, sizeof(buf), "Unexpected signature:");
-	for (x=0;x<16;x++) {
+	for (x=0; x<16; x++) {
 		snprintf(buf2, sizeof(buf2), " %02x", *(d++));
 		strcat(buf, buf2);
 	}
@@ -78,7 +89,7 @@
 {
 	int match = 1;
 	int x;
-	for (x=0;x<16;x++) {
+	for (x=0; x<16; x++) {
 		match &= (key1[x] == key2[x]);
 	}
 	return match;
@@ -97,17 +108,6 @@
 	return -1;
 }
 
-static struct loadupdate {
-	int (*updater)(void);
-	struct loadupdate *next;
-} *updaters = NULL;
-
-AST_MUTEX_DEFINE_STATIC(modlock);
-AST_MUTEX_DEFINE_STATIC(reloadlock);
-
-static struct module *module_list=NULL;
-static int modlistver = 0;
-
 int ast_unload_resource(const char *resource_name, int force)
 {
 	struct module *m, *ml = NULL;
@@ -157,6 +157,7 @@
 	struct module *m;
 	int which=0;
 	char *ret;
+
 	if (pos != rpos)
 		return NULL;
 	ast_mutex_lock(&modlock);
@@ -502,8 +503,9 @@
 		DIR *mods;
 		struct dirent *d;
 		int x;
+
 		/* Loop through each order */
-		for (x=0;x<sizeof(loadorder) / sizeof(loadorder[0]);x++) {
+		for (x=0; x<sizeof(loadorder) / sizeof(loadorder[0]); x++) {
 			mods = opendir((char *)ast_config_AST_MODULE_DIR);
 			if (mods) {
 				while((d = readdir(mods))) {
@@ -531,7 +533,7 @@
 							}
 							
 						}
-					    if (option_debug && !option_verbose)
+						if (option_debug && !option_verbose)
 							ast_log(LOG_DEBUG, "Loading module %s\n", d->d_name);
 						if (option_verbose) {
 							ast_verbose( VERBOSE_PREFIX_1 "[%s]", term_color(tmp, d->d_name, COLOR_BRWHITE, 0, sizeof(tmp)));




More information about the svn-commits mailing list