mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
(closes issue #13557)
Reported by: nickpeirson The user attached a patch, but the license is not yet recorded. I took the liberty of finding and replacing ALL index() calls with strchr() calls, and that involves more than just main/pbx.c; chan_oss, app_playback, func_cut also had calls to index(), and I changed them out. 1.4 had no references to index() at all. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@144569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -82,7 +82,7 @@ static int sort_internal(struct ast_channel *chan, char *data, char *buffer, siz
|
||||
/* Parse each into a struct */
|
||||
count2 = 0;
|
||||
while ((ptrkey = strsep(&strings, ","))) {
|
||||
ptrvalue = index(ptrkey, ':');
|
||||
ptrvalue = strchr(ptrkey, ':');
|
||||
if (!ptrvalue) {
|
||||
count--;
|
||||
continue;
|
||||
@@ -171,7 +171,7 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size
|
||||
/* Get to start, if any */
|
||||
if (num1 > 0) {
|
||||
while (tmp2 != (char *)NULL + 1 && curfieldnum < num1) {
|
||||
tmp2 = index(tmp2, d) + 1;
|
||||
tmp2 = strchr(tmp2, d) + 1;
|
||||
curfieldnum++;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user