aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_cut.c
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-25 22:23:21 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-09-25 22:23:21 +0000
commit98f0dbb71a9732df94209c6b916d9ab9244c7194 (patch)
tree60fe6b1b2aca47ef011eee35faf02931224540da /funcs/func_cut.c
parent33753a97901e0039d33e884d2dbf6161440b2805 (diff)
Merged revisions 144569 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r144569 | murf | 2008-09-25 16:21:28 -0600 (Thu, 25 Sep 2008) | 14 lines (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: http://svn.digium.com/svn/asterisk/branches/1.6.0@144570 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_cut.c')
-rw-r--r--funcs/func_cut.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/funcs/func_cut.c b/funcs/func_cut.c
index 169fed6b5..96779b661 100644
--- a/funcs/func_cut.c
+++ b/funcs/func_cut.c
@@ -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++;
}
}