localize some variables
authorLuigi Rizzo <rizzo@icir.org>
Mon, 8 May 2006 16:14:29 +0000 (16:14 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Mon, 8 May 2006 16:14:29 +0000 (16:14 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25652 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx.c

diff --git a/pbx.c b/pbx.c
index 2101442..b563d3f 100644 (file)
--- a/pbx.c
+++ b/pbx.c
@@ -1259,7 +1259,7 @@ static void pbx_substitute_variables_helper_full(struct ast_channel *c, struct v
        /* Substitutes variables into cp2, based on string cp1, and assuming cp2 to be
           zero-filled */
        whereweare=tmp=cp1;
-       while(!ast_strlen_zero(whereweare) && count) {
+       while (!ast_strlen_zero(whereweare) && count) {
                /* Assume we're copying the whole remaining string */
                pos = strlen(whereweare);
                nextvar = NULL;
@@ -1691,15 +1691,16 @@ int ast_extension_state(struct ast_channel *c, const char *context, const char *
 void ast_hint_state_changed(const char *device)
 {
        struct ast_hint *hint;
-       struct ast_state_cb *cblist;
-       char buf[AST_MAX_EXTENSION];
-       char *parse;
-       char *cur;
-       int state;
 
        AST_LIST_LOCK(&hints);
 
        AST_LIST_TRAVERSE(&hints, hint, list) {
+               struct ast_state_cb *cblist;
+               char buf[AST_MAX_EXTENSION];
+               char *parse;
+               char *cur;
+               int state;
+
                ast_copy_string(buf, ast_get_extension_app(hint->exten), sizeof(buf));
                parse = buf;
                for (cur = strsep(&parse, "&"); cur; cur = strsep(&parse, "&")) {