[svn-commits] trunk - r7850 /trunk/file.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sat Jan 7 08:47:37 CST 2006


Author: tilghman
Date: Sat Jan  7 08:47:36 2006
New Revision: 7850

URL: http://svn.digium.com/view/asterisk?rev=7850&view=rev
Log:
Bug 6161 - Remove duplicated code

Modified:
    trunk/file.c

Modified: trunk/file.c
URL: http://svn.digium.com/view/asterisk/trunk/file.c?rev=7850&r1=7849&r2=7850&view=diff
==============================================================================
--- trunk/file.c (original)
+++ trunk/file.c Sat Jan  7 08:47:36 2006
@@ -365,13 +365,9 @@
 	/* Check for a specific format */
 	if (ast_mutex_lock(&formatlock)) {
 		ast_log(LOG_WARNING, "Unable to lock format list\n");
-		if (action == ACTION_EXISTS)
-			return 0;
-		else
-			return -1;
-	}
-	f = formats;
-	while(f) {
+		return res;
+	}
+	for (f = formats; f; f = f->next) {
 		if (!fmt || exts_compare(f->exts, fmt)) {
 			char *stringp=NULL;
 			exts = ast_strdupa(f->exts);
@@ -452,7 +448,6 @@
 			} while(ext);
 			
 		}
-		f = f->next;
 	}
 	ast_mutex_unlock(&formatlock);
 	if ((action == ACTION_EXISTS) || (action == ACTION_OPEN))



More information about the svn-commits mailing list