aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_speech_utils.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-11 17:34:30 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-11 17:34:30 +0000
commitf9980e7f7cb05f2e6f95d0cdde8cb853ef5756d1 (patch)
treeb4f7d56dc6c4dca246072a682969e85f07d0de1f /apps/app_speech_utils.c
parentf0ef34826c9accbfbf3d2e0cc52a5b2ff537d7ec (diff)
Use the linkedlists.h AST_LIST_NEXT macro for modifying the list of results.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@74616 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_speech_utils.c')
-rw-r--r--apps/app_speech_utils.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c
index 2df89ba4e..30d1737f3 100644
--- a/apps/app_speech_utils.c
+++ b/apps/app_speech_utils.c
@@ -150,7 +150,7 @@ static struct ast_speech_result *find_result(struct ast_speech_result *results,
if (i == wanted_num)
break;
i++;
- } while ((result = result->next));
+ } while ((result = AST_LIST_NEXT(result, list)));
return result;
}
@@ -315,11 +315,8 @@ static int speech_read(struct ast_channel *chan, const char *cmd, char *data,
ast_copy_string(buf, "0", len);
} else if (!strcasecmp(data, "results")) {
/* Count number of results */
- result = speech->results;
- while (result) {
+ for (result = speech->results; result; result = AST_LIST_NEXT(result, list))
results++;
- result = result->next;
- }
snprintf(tmp, sizeof(tmp), "%d", results);
ast_copy_string(buf, tmp, len);
}