diff options
author | Steve Murphy <murf@digium.com> | 2008-09-25 22:21:28 +0000 |
---|---|---|
committer | Steve Murphy <murf@digium.com> | 2008-09-25 22:21:28 +0000 |
commit | e74584ca3c7bcb6d7ae186e6d2509e8e47f1e05c (patch) | |
tree | d65eb8d286874f046ba4d176dbe810f484a8ebda /main/pbx.c | |
parent | a36696f2e7b89ec2cc2fb4cdb3e00147f12db269 (diff) |
(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
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/pbx.c b/main/pbx.c index ea0294e00..af3090cdf 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -1048,7 +1048,7 @@ static void pbx_destroy(struct ast_pbx *p) * NULL * * In the above, I could easily turn "N" into "23456789", but I think that a quick "if( *z >= '2' && *z <= '9' )" might take - * fewer CPU cycles than a call to index("23456789",*z), where *z is the char to match... + * fewer CPU cycles than a call to strchr("23456789",*z), where *z is the char to match... * * traversal is pretty simple: one routine merely traverses the alt list, and for each matching char in the pattern, it calls itself * on the corresponding next pointer, incrementing also the pointer of the string to be matched, and passing the total specificity and length. @@ -1346,7 +1346,7 @@ static void new_find_extension(const char *str, struct scoreboard *score, struct return; /* the first match is all we need */ } } - } else if (index(p->x, *str)) { + } else if (strchr(p->x, *str)) { ast_debug(4, "Nothing strange about this match\n"); NEW_MATCHER_CHK_MATCH; NEW_MATCHER_RECURSE; |