mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 02:48:29 +00:00
Merge rgagnon's pedantic string changes (apps n-z) (bug #2038)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -59,9 +59,10 @@ static int substring_exec(struct ast_channel *chan, void *data)
|
||||
char newexten[AST_MAX_EXTENSION] = "";
|
||||
char *count1, *count2;
|
||||
char *first, *second, *stringp;
|
||||
|
||||
stringp=alloca(strlen(data)+1);
|
||||
ast_log(LOG_WARNING, "The use of Substring application is deprecated. Please use ${variable:a:b} instead\n");
|
||||
strncpy(stringp,data,strlen(data)+1);
|
||||
strncpy(stringp,data,strlen(data));
|
||||
if (strchr(stringp,'|')&&strchr(stringp,'=')) {
|
||||
int icount1,icount2;
|
||||
first=strsep(&stringp,"=");
|
||||
|
||||
Reference in New Issue
Block a user