[asterisk-commits] trunk r20166 - /trunk/asterisk.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Apr 14 15:17:29 MST 2006


Author: rizzo
Date: Fri Apr 14 17:17:27 2006
New Revision: 20166

URL: http://svn.digium.com/view/asterisk?rev=20166&view=rev
Log:
normalize cli completion code


Modified:
    trunk/asterisk.c

Modified: trunk/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/asterisk.c?rev=20166&r1=20165&r2=20166&view=diff
==============================================================================
--- trunk/asterisk.c (original)
+++ trunk/asterisk.c Fri Apr 14 17:17:27 2006
@@ -548,11 +548,9 @@
 
 	AST_LIST_LOCK(&file_versions);
 	AST_LIST_TRAVERSE(&file_versions, find, list) {
-		if (!strncasecmp(word, find->file, matchlen)) {
-			if (++which > state) {
-				ret = strdup(find->file);
-				break;
-			}
+		if (!strncasecmp(word, find->file, matchlen) && ++which > state) {
+			ret = ast_strdup(find->file);
+			break;
 		}
 	}
 	AST_LIST_UNLOCK(&file_versions);



More information about the asterisk-commits mailing list