summaryrefslogtreecommitdiff
path: root/main/pbx.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2011-07-22 21:15:28 +0000
committerRichard Mudgett <rmudgett@digium.com>2011-07-22 21:15:28 +0000
commitc0f592df46463564c83578ff6c610e4fae9bce5b (patch)
tree069eeb4793bd71a945010f0a3f568d0fee64fb59 /main/pbx.c
parenta5c65bb93910b94341a95f3bcb8a2029019651fe (diff)
Merged revisions 329334 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r329334 | rmudgett | 2011-07-22 16:14:22 -0500 (Fri, 22 Jul 2011) | 1 line Make use less redundant loop construct for iterating over hints. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@329335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/pbx.c b/main/pbx.c
index e991c55ef..a2054646d 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -6084,7 +6084,7 @@ static char *handle_show_hints(struct ast_cli_entry *e, int cmd, struct ast_cli_
ast_cli(a->fd, "\n -= Registered Asterisk Dial Plan Hints =-\n");
i = ao2_iterator_init(hints, 0);
- for (hint = ao2_iterator_next(&i); hint; ao2_ref(hint, -1), hint = ao2_iterator_next(&i)) {
+ for (; (hint = ao2_iterator_next(&i)); ao2_ref(hint, -1)) {
ao2_lock(hint);
if (!hint->exten) {
/* The extension has already been destroyed */
@@ -6123,7 +6123,7 @@ static char *complete_core_show_hint(const char *line, const char *word, int pos
/* walk through all hints */
i = ao2_iterator_init(hints, 0);
- for (hint = ao2_iterator_next(&i); hint; ao2_ref(hint, -1), hint = ao2_iterator_next(&i)) {
+ for (; (hint = ao2_iterator_next(&i)); ao2_ref(hint, -1)) {
ao2_lock(hint);
if (!hint->exten) {
/* The extension has already been destroyed */
@@ -6172,7 +6172,7 @@ static char *handle_show_hint(struct ast_cli_entry *e, int cmd, struct ast_cli_a
extenlen = strlen(a->argv[3]);
i = ao2_iterator_init(hints, 0);
- for (hint = ao2_iterator_next(&i); hint; ao2_ref(hint, -1), hint = ao2_iterator_next(&i)) {
+ for (; (hint = ao2_iterator_next(&i)); ao2_ref(hint, -1)) {
ao2_lock(hint);
if (!hint->exten) {
/* The extension has already been destroyed */
@@ -7414,7 +7414,7 @@ void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_
/* preserve all watchers for hints */
i = ao2_iterator_init(hints, AO2_ITERATOR_DONTLOCK);
- for (hint = ao2_iterator_next(&i); hint; ao2_ref(hint, -1), hint = ao2_iterator_next(&i)) {
+ for (; (hint = ao2_iterator_next(&i)); ao2_ref(hint, -1)) {
if (ao2_container_count(hint->callbacks)) {
ao2_lock(hint);
if (!hint->exten) {
@@ -10207,7 +10207,7 @@ static int hints_data_provider_get(const struct ast_data_search *search,
}
i = ao2_iterator_init(hints, 0);
- for (hint = ao2_iterator_next(&i); hint; ao2_ref(hint, -1), hint = ao2_iterator_next(&i)) {
+ for (; (hint = ao2_iterator_next(&i)); ao2_ref(hint, -1)) {
watchers = ao2_container_count(hint->callbacks);
data_hint = ast_data_add_node(data_root, "hint");
if (!data_hint) {