diff options
-rw-r--r-- | apps/confbridge/conf_config_parser.c | 6 | ||||
-rw-r--r-- | channels/chan_agent.c | 1 | ||||
-rw-r--r-- | channels/chan_gtalk.c | 4 | ||||
-rw-r--r-- | channels/chan_oss.c | 8 | ||||
-rw-r--r-- | channels/chan_phone.c | 13 | ||||
-rw-r--r-- | channels/chan_skinny.c | 19 | ||||
-rw-r--r-- | pbx/pbx_config.c | 2 | ||||
-rw-r--r-- | pbx/pbx_dundi.c | 6 | ||||
-rw-r--r-- | pbx/pbx_lua.c | 2 |
9 files changed, 29 insertions, 32 deletions
diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c index 9bb8b2af9..a73c65820 100644 --- a/apps/confbridge/conf_config_parser.c +++ b/apps/confbridge/conf_config_parser.c @@ -711,9 +711,9 @@ static int add_menu_entry(struct conf_menu *menu, const char *dtmf, const char * /* if adding any of the actions failed, bail */ if (res) { - struct conf_menu_action *action; - while ((action = AST_LIST_REMOVE_HEAD(&menu_entry->actions, action))) { - ast_free(action); + struct conf_menu_action *menu_action; + while ((menu_action = AST_LIST_REMOVE_HEAD(&menu_entry->actions, action))) { + ast_free(menu_action); } ast_free(menu_entry); return -1; diff --git a/channels/chan_agent.c b/channels/chan_agent.c index 4ce43a5a3..836154092 100644 --- a/channels/chan_agent.c +++ b/channels/chan_agent.c @@ -778,7 +778,6 @@ static int agent_indicate(struct ast_channel *ast, int condition, const void *da ast_mutex_lock(&p->lock); if (p->chan && !ast_check_hangup(p->chan)) { while (ast_channel_trylock(p->chan)) { - int res; if ((res = ast_channel_unlock(ast))) { ast_log(LOG_ERROR, "chan_agent bug! Channel was not locked upon entry to agent_indicate: %s\n", strerror(res)); ast_mutex_unlock(&p->lock); diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c index 9e8425692..c13cbfc7d 100644 --- a/channels/chan_gtalk.c +++ b/channels/chan_gtalk.c @@ -958,9 +958,9 @@ static int gtalk_create_candidates(struct gtalk *client, struct gtalk_pvt *p, ch /* put the initiator attribute to lower case if we receive the call * otherwise GoogleTalk won't establish the session */ if (!p->initiator) { - char c; + char cur; char *t = lowerfrom = ast_strdupa(from); - while (((c = *t) != '/') && (*t++ = tolower(c))); + while (((cur = *t) != '/') && (*t++ = tolower(cur))); } iks_insert_attrib(gtalk, "initiator", (p->initiator) ? to : lowerfrom); iks_insert_attrib(gtalk, "xmlns", GOOGLE_NS); diff --git a/channels/chan_oss.c b/channels/chan_oss.c index ddd559af1..ca26e7922 100644 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -1099,16 +1099,16 @@ static char *console_dial(struct ast_cli_entry *e, int cmd, struct ast_cli_args if (o->owner) { /* already in a call */ int i; struct ast_frame f = { AST_FRAME_DTMF, { 0 } }; - const char *s; + const char *digits; if (a->argc == e->args) { /* argument is mandatory here */ ast_cli(a->fd, "Already in a call. You can only dial digits until you hangup.\n"); return CLI_FAILURE; } - s = a->argv[e->args]; + digits = a->argv[e->args]; /* send the string one char at a time */ - for (i = 0; i < strlen(s); i++) { - f.subclass.integer = s[i]; + for (i = 0; i < strlen(digits); i++) { + f.subclass.integer = digits[i]; ast_queue_frame(o->owner, &f); } return CLI_SUCCESS; diff --git a/channels/chan_phone.c b/channels/chan_phone.c index 6926a7d4f..f7e7c335e 100644 --- a/channels/chan_phone.c +++ b/channels/chan_phone.c @@ -1018,7 +1018,7 @@ static void *do_monitor(void *data) struct phone_pvt *i; int tonepos = 0; /* The tone we're playing this round */ - struct timeval tv = { 0, 0 }; + struct timeval to = { 0, 0 }; int dotone; /* This thread monitors all the frame relay interfaces which are not yet in use (and thus do not have a separate thread) indefinitely */ @@ -1055,7 +1055,7 @@ static void *do_monitor(void *data) if (i->dialtone && i->mode != MODE_SIGMA) { /* Remember we're going to have to come back and play more dialtones */ - if (ast_tvzero(tv)) { + if (ast_tvzero(to)) { /* If we're due for a dialtone, play one */ if (write(i->fd, DialTone + tonepos, 240) != 240) { ast_log(LOG_WARNING, "Dial tone write error\n"); @@ -1075,13 +1075,13 @@ static void *do_monitor(void *data) if (tonepos >= sizeof(DialTone)) { tonepos = 0; } - if (ast_tvzero(tv)) { - tv = ast_tv(0, 30000); + if (ast_tvzero(to)) { + to = ast_tv(0, 30000); } - res = ast_poll2(fds, inuse_fds, &tv); + res = ast_poll2(fds, inuse_fds, &to); } else { res = ast_poll(fds, inuse_fds, -1); - tv = ast_tv(0, 0); + to = ast_tv(0, 0); tonepos = 0; } /* Okay, select has finished. Let's see what happened. */ @@ -1437,7 +1437,6 @@ static int load_module(void) } else if (!strcasecmp(v->name, "context")) { ast_copy_string(context, v->value, sizeof(context)); } else if (!strcasecmp(v->name, "format")) { - struct ast_format tmpfmt; if (!strcasecmp(v->value, "g729")) { ast_format_cap_set(prefcap, ast_format_set(&tmpfmt, AST_FORMAT_G729A, 0)); } else if (!strcasecmp(v->value, "g723.1")) { diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 0323237e3..c4f44345c 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -5392,7 +5392,7 @@ static void dumpsub(struct skinny_subchannel *sub, int forcehangup) { struct skinny_line *l = sub->line; struct skinny_device *d = l->device; - struct skinny_subchannel *activatesub = NULL; + struct skinny_subchannel *activate_sub = NULL; struct skinny_subchannel *tsub; if (skinnydebug) { @@ -5408,9 +5408,9 @@ static void dumpsub(struct skinny_subchannel *sub, int forcehangup) d->hookstate = SKINNY_ONHOOK; transmit_speaker_mode(d, SKINNY_SPEAKEROFF); if (sub->related) { - activatesub = sub->related; + activate_sub = sub->related; setsubstate(sub, SUBSTATE_ONHOOK); - l->activesub = activatesub; + l->activesub = activate_sub; if (l->activesub->substate != SUBSTATE_HOLD) { ast_log(LOG_WARNING, "Sub-%d was related but not at SUBSTATE_HOLD\n", sub->callid); return; @@ -5420,20 +5420,20 @@ static void dumpsub(struct skinny_subchannel *sub, int forcehangup) setsubstate(sub, SUBSTATE_ONHOOK); AST_LIST_TRAVERSE(&l->sub, tsub, list) { if (tsub->substate == SUBSTATE_CALLWAIT) { - activatesub = tsub; + activate_sub = tsub; } } - if (activatesub) { - setsubstate(activatesub, SUBSTATE_RINGIN); + if (activate_sub) { + setsubstate(activate_sub, SUBSTATE_RINGIN); return; } AST_LIST_TRAVERSE(&l->sub, tsub, list) { if (tsub->substate == SUBSTATE_HOLD) { - activatesub = tsub; + activate_sub = tsub; } } - if (activatesub) { - setsubstate(activatesub, SUBSTATE_HOLD); + if (activate_sub) { + setsubstate(activate_sub, SUBSTATE_HOLD); return; } } @@ -6674,7 +6674,6 @@ static int handle_message(struct skinny_req *req, struct skinnysession *s) break; case KEYPAD_BUTTON_MESSAGE: { - struct skinny_device *d = s->device; struct skinny_subchannel *sub; int lineInstance; int callReference; diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c index 4aeabe9c2..86b132279 100644 --- a/pbx/pbx_config.c +++ b/pbx/pbx_config.c @@ -1632,8 +1632,8 @@ process_extension: v->value, cxt, v->lineno, vfile); } } else if (!strcasecmp(v->name, "switch") || !strcasecmp(v->name, "lswitch") || !strcasecmp(v->name, "eswitch")) { - char *stringp = realvalue; char *appl, *data; + stringp = realvalue; if (!strcasecmp(v->name, "switch")) { pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1); diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index ab48ad6a3..2e5c39e17 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -1224,7 +1224,7 @@ static int cache_lookup_internal(time_t now, struct dundi_request *req, char *ke return 0; } -static int cache_lookup(struct dundi_request *req, dundi_eid *peer_eid, uint32_t crc32, int *lowexpiration) +static int cache_lookup(struct dundi_request *req, dundi_eid *peer_eid, uint32_t crc, int *lowexpiration) { char key[256]; char eid_str[20]; @@ -1240,7 +1240,7 @@ static int cache_lookup(struct dundi_request *req, dundi_eid *peer_eid, uint32_t dundi_eid_to_str_short(eid_str, sizeof(eid_str), peer_eid); dundi_eid_to_str_short(eidroot_str, sizeof(eidroot_str), &req->root_eid); ast_eid_to_str(eid_str_full, sizeof(eid_str_full), peer_eid); - snprintf(key, sizeof(key), "%s/%s/%s/e%08x", eid_str, req->number, req->dcontext, crc32); + snprintf(key, sizeof(key), "%s/%s/%s/e%08x", eid_str, req->number, req->dcontext, crc); res |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration); snprintf(key, sizeof(key), "%s/%s/%s/e%08x", eid_str, req->number, req->dcontext, 0); res |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration); @@ -1255,7 +1255,7 @@ static int cache_lookup(struct dundi_request *req, dundi_eid *peer_eid, uint32_t break; x++; /* Check for hints */ - snprintf(key, sizeof(key), "hint/%s/%s/%s/e%08x", eid_str, tmp, req->dcontext, crc32); + snprintf(key, sizeof(key), "hint/%s/%s/%s/e%08x", eid_str, tmp, req->dcontext, crc); res2 |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration); snprintf(key, sizeof(key), "hint/%s/%s/%s/e%08x", eid_str, tmp, req->dcontext, 0); res2 |= cache_lookup_internal(now, req, key, eid_str_full, lowexpiration); diff --git a/pbx/pbx_lua.c b/pbx/pbx_lua.c index d0e0f984b..928861698 100644 --- a/pbx/pbx_lua.c +++ b/pbx/pbx_lua.c @@ -1257,7 +1257,7 @@ static lua_State *lua_get_state(struct ast_channel *chan) lua_State *L; if (!chan) { - lua_State *L = luaL_newstate(); + L = luaL_newstate(); if (!L) { ast_log(LOG_ERROR, "Error allocating lua_State, no memory\n"); return NULL; |