[asterisk-commits] tilghman: trunk r99015 - /trunk/funcs/func_cut.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 17 20:06:27 CST 2008


Author: tilghman
Date: Thu Jan 17 20:06:27 2008
New Revision: 99015

URL: http://svn.digium.com/view/asterisk?view=rev&rev=99015
Log:
Reset default CUT delimiter back to '-'

Modified:
    trunk/funcs/func_cut.c

Modified: trunk/funcs/func_cut.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_cut.c?view=diff&rev=99015&r1=99014&r2=99015
==============================================================================
--- trunk/funcs/func_cut.c (original)
+++ trunk/funcs/func_cut.c Thu Jan 17 20:06:27 2008
@@ -63,7 +63,7 @@
 	int count=1, count2, element_count=0;
 	struct sortable_keys *sortable_keys;
 
-	memset(buffer, 0, buflen);
+	*buffer = '\0';
 
 	if (!data)
 		return ERROR_NOARG;
@@ -118,7 +118,7 @@
 		AST_APP_ARG(field);
 	);
 
-	memset(buffer, 0, buflen); 
+	*buffer = '\0';
 
 	parse = ast_strdupa(data);
 
@@ -139,7 +139,7 @@
 		}
 
 		if (ast_get_encoded_char(args.delimiter, ds, &delim_consumed))
-			return ERROR_NOARG;
+			ast_copy_string(ds, "-", sizeof(ds));
 
 		/* String form of the delimiter, for use with strsep(3) */
 		d = *ds;




More information about the asterisk-commits mailing list