From 6331b0b8313194270a2e77e8fa873c61a61e8d12 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Fri, 18 Jan 2008 02:06:27 +0000 Subject: [PATCH] Reset default CUT delimiter back to '-' git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99015 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- funcs/func_cut.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/funcs/func_cut.c b/funcs/func_cut.c index 142b768d9c..169fed6b5b 100644 --- a/funcs/func_cut.c +++ b/funcs/func_cut.c @@ -63,7 +63,7 @@ static int sort_internal(struct ast_channel *chan, char *data, char *buffer, siz 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 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size AST_APP_ARG(field); ); - memset(buffer, 0, buflen); + *buffer = '\0'; parse = ast_strdupa(data); @@ -139,7 +139,7 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size } 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;