Index: channels/chan_phone.c =================================================================== --- channels/chan_phone.c (revision 66979) +++ channels/chan_phone.c (working copy) @@ -164,7 +164,7 @@ static int phone_write(struct ast_channel *ast, struct ast_frame *frame); static struct ast_frame *phone_exception(struct ast_channel *ast); static int phone_send_text(struct ast_channel *ast, const char *text); -static int phone_fixup(struct ast_channel *old, struct ast_channel *new); +static int phone_fixup(struct ast_channel *oldchan, struct ast_channel *newchan); static int phone_indicate(struct ast_channel *chan, int condition, const void *data, size_t datalen); static const struct ast_channel_tech phone_tech = { @@ -229,11 +229,11 @@ return res; } -static int phone_fixup(struct ast_channel *old, struct ast_channel *new) +static int phone_fixup(struct ast_channel *oldchan, struct ast_channel *newchan) { - struct phone_pvt *pvt = old->tech_pvt; - if (pvt && pvt->owner == old) - pvt->owner = new; + struct phone_pvt *pvt = oldchan->tech_pvt; + if (pvt && pvt->owner == oldchan) + pvt->owner = newchan; return 0; } Index: channels/chan_misdn.c =================================================================== --- channels/chan_misdn.c (revision 66979) +++ channels/chan_misdn.c (working copy) @@ -262,14 +262,14 @@ if (!strcasecmp(iter->group, group)) return iter; } - struct robin_list *new = (struct robin_list *)calloc(1, sizeof(struct robin_list)); - new->group = strndup(group, strlen(group)); - new->channel = 1; + struct robin_list *newitem = (struct robin_list *)calloc(1, sizeof(struct robin_list)); + newitem->group = strndup(group, strlen(group)); + newitem->channel = 1; if (robin) { - new->next = robin; - robin->prev = new; + newitem->next = robin; + robin->prev = newitem; } - robin = new; + robin = newitem; return robin; } Index: channels/chan_skinny.c =================================================================== --- channels/chan_skinny.c (revision 66979) +++ channels/chan_skinny.c (working copy) @@ -1705,8 +1705,8 @@ static void do_housekeeping(struct skinnysession *s) { /* - int new; - int old; + int newmsgs; + int oldmsgs; struct skinny_device *d = s->device; struct skinny_line *l; */ @@ -1718,7 +1718,7 @@ if (has_voicemail(l)) { if (skinnydebug) ast_verbose("Checking for voicemail Skinny %s@%s\n", l->name, d->name); - ast_app_inboxcount(l->mailbox, &new, &old); + ast_app_inboxcount(l->mailbox, &newmsgs, &oldmsgs); if (skinnydebug) ast_verbose("Skinny %s@%s has voicemail!\n", l->name, d->name); transmit_lamp_indication(s, STIMULUS_VOICEMAIL, l->instance, l->mwiblink?SKINNY_LAMP_BLINK:SKINNY_LAMP_ON); Index: channels/chan_local.c =================================================================== --- channels/chan_local.c (revision 66979) +++ channels/chan_local.c (working copy) @@ -435,7 +435,7 @@ { struct local_pvt *p = ast->tech_pvt; int res; - struct ast_var_t *varptr = NULL, *new; + struct ast_var_t *varptr = NULL, *newvar; size_t len, namelen; if (!p) @@ -457,10 +457,10 @@ AST_LIST_TRAVERSE(&p->owner->varshead, varptr, entries) { namelen = strlen(varptr->name); len = sizeof(struct ast_var_t) + namelen + strlen(varptr->value) + 2; - if ((new = ast_calloc(1, len))) { - memcpy(new, varptr, len); - new->value = &(new->name[0]) + namelen + 1; - AST_LIST_INSERT_TAIL(&p->chan->varshead, new, entries); + if ((newvar = ast_calloc(1, len))) { + memcpy(newvar, varptr, len); + newvar->value = &(newvar->name[0]) + namelen + 1; + AST_LIST_INSERT_TAIL(&p->chan->varshead, newvar, entries); } } Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 66979) +++ channels/chan_sip.c (working copy) @@ -1348,7 +1348,7 @@ static void print_group(int fd, ast_group_t group, int crlf); static const char *dtmfmode2str(int mode) attribute_const; static const char *insecure2str(int port, int invite) attribute_const; -static void cleanup_stale_contexts(char *new, char *old); +static void cleanup_stale_contexts(char *newlist, char *oldlist); static void print_codec_to_cli(int fd, struct ast_codec_pref *pref); static const char *domain_mode_to_text(const enum domain_mode mode); static int sip_show_domains(int fd, int argc, char *argv[]); @@ -5446,7 +5446,7 @@ int start = 0; for (;;) { - char new[256]; + char buf[256]; const char *oh = __get_header(orig, field, &start); if (ast_strlen_zero(oh)) @@ -5482,17 +5482,17 @@ } /* Add rport to first VIA header if requested */ - snprintf(new, sizeof(new), "%s;received=%s;rport=%d%s%s", + snprintf(buf, sizeof(buf), "%s;received=%s;rport=%d%s%s", leftmost, ast_inet_ntoa(p->recv.sin_addr), ntohs(p->recv.sin_port), others ? "," : "", others ? others : ""); } else { /* We should *always* add a received to the topmost via */ - snprintf(new, sizeof(new), "%s;received=%s%s%s", + snprintf(buf, sizeof(buf), "%s;received=%s%s%s", leftmost, ast_inet_ntoa(p->recv.sin_addr), others ? "," : "", others ? others : ""); } - oh = new; /* the header to copy */ + oh = buf; /* the header to copy */ } /* else add the following via headers untouched */ add_header(req, field, oh); copied++; @@ -9775,14 +9775,14 @@ /*! \brief Destroy disused contexts between reloads Only used in reload_config so the code for regcontext doesn't get ugly */ -static void cleanup_stale_contexts(char *new, char *old) +static void cleanup_stale_contexts(char *newlist, char *oldlist) { - char *oldcontext, *newcontext, *stalecontext, *stringp, newlist[AST_MAX_CONTEXT]; + char *oldcontext, *newcontext, *stalecontext, *stringp, buf[AST_MAX_CONTEXT]; - while ((oldcontext = strsep(&old, "&"))) { + while ((oldcontext = strsep(&oldlist, "&"))) { stalecontext = '\0'; - ast_copy_string(newlist, new, sizeof(newlist)); - stringp = newlist; + ast_copy_string(buf, newlist, sizeof(buf)); + stringp = buf; while ((newcontext = strsep(&stringp, "&"))) { if (strcmp(newcontext, oldcontext) == 0) { /* This is not the context you're looking for */ Index: channels/chan_iax2.c =================================================================== --- channels/chan_iax2.c (revision 66979) +++ channels/chan_iax2.c (working copy) @@ -1092,18 +1092,18 @@ static struct iax_frame *iaxfrdup2(struct iax_frame *fr) { - struct iax_frame *new = iax_frame_new(DIRECTION_INGRESS, fr->af.datalen, fr->cacheable); - if (new) { - size_t mallocd_datalen = new->mallocd_datalen; - memcpy(new, fr, sizeof(*new)); - iax_frame_wrap(new, &fr->af); - new->mallocd_datalen = mallocd_datalen; - new->data = NULL; - new->datalen = 0; - new->direction = DIRECTION_INGRESS; - new->retrans = -1; + struct iax_frame *newfr = iax_frame_new(DIRECTION_INGRESS, fr->af.datalen, fr->cacheable); + if (newfr) { + size_t mallocd_datalen = newfr->mallocd_datalen; + memcpy(newfr, fr, sizeof(*newfr)); + iax_frame_wrap(newfr, &fr->af); + newfr->mallocd_datalen = mallocd_datalen; + newfr->data = NULL; + newfr->datalen = 0; + newfr->direction = DIRECTION_INGRESS; + newfr->retrans = -1; } - return new; + return newfr; } #define NEW_PREVENT 0 @@ -1205,13 +1205,13 @@ return res; } -static int find_callno(unsigned short callno, unsigned short dcallno, struct sockaddr_in *sin, int new, int lockpeer, int sockfd) +static int find_callno(unsigned short callno, unsigned short dcallno, struct sockaddr_in *sin, int newflag, int lockpeer, int sockfd) { int res = 0; int x; struct timeval now; char host[80]; - if (new <= NEW_ALLOW) { + if (newflag <= NEW_ALLOW) { /* Look for an existing connection first */ for (x=1;(res < 1) && (x= NEW_ALLOW)) { + if ((res < 1) && (newflag >= NEW_ALLOW)) { /* It may seem odd that we look through the peer list for a name for * this *incoming* call. Well, it is weird. However, users don't * have an IP address/port number that we can match against. So, @@ -5221,20 +5221,20 @@ int newcall = 0; char newip[256]; struct iax_ie_data ied; - struct sockaddr_in new; + struct sockaddr_in newaddr; memset(&ied, 0, sizeof(ied)); if (ies->apparent_addr) - bcopy(ies->apparent_addr, &new, sizeof(new)); + bcopy(ies->apparent_addr, &newaddr, sizeof(newaddr)); if (ies->callno) newcall = ies->callno; - if (!newcall || !new.sin_addr.s_addr || !new.sin_port) { + if (!newcall || !newaddr.sin_addr.s_addr || !newaddr.sin_port) { ast_log(LOG_WARNING, "Invalid transfer request\n"); return -1; } pvt->transfercallno = newcall; - memcpy(&pvt->transfer, &new, sizeof(pvt->transfer)); + memcpy(&pvt->transfer, &newaddr, sizeof(pvt->transfer)); inet_aton(newip, &pvt->transfer.sin_addr); pvt->transfer.sin_family = AF_INET; pvt->transferring = TRANSFER_BEGIN; @@ -5658,13 +5658,13 @@ iax_ie_append_short(&ied, IAX_IE_REFRESH, p->expiry); iax_ie_append_addr(&ied, IAX_IE_APPARENT_ADDR, &p->addr); if (!ast_strlen_zero(p->mailbox)) { - int new, old; - ast_app_inboxcount(p->mailbox, &new, &old); - if (new > 255) - new = 255; - if (old > 255) - old = 255; - msgcount = (old << 8) | new; + int newmsgs, oldmsgs; + ast_app_inboxcount(p->mailbox, &newmsgs, &oldmsgs); + if (newmsgs > 255) + newmsgs = 255; + if (oldmsgs > 255) + oldmsgs = 255; + msgcount = (oldmsgs << 8) | newmsgs; iax_ie_append_short(&ied, IAX_IE_MSGCOUNT, msgcount); } if (ast_test_flag(p, IAX_HASCALLERID)) { @@ -6260,7 +6260,7 @@ struct sockaddr_in sin; int res; int updatehistory=1; - int new = NEW_PREVENT; + int newflag = NEW_PREVENT; void *ptr; int dcallno = 0; struct ast_iax2_full_hdr *fh = (struct ast_iax2_full_hdr *)thread->buf; @@ -6312,7 +6312,7 @@ } /* This is a video frame, get call number */ - fr->callno = find_callno(ntohs(vh->callno) & ~0x8000, dcallno, &sin, new, 1, fd); + fr->callno = find_callno(ntohs(vh->callno) & ~0x8000, dcallno, &sin, newflag, 1, fd); minivid = 1; } else if ((meta->zeros == 0) && !(ntohs(meta->metacmd) & 0x8000)) { unsigned char metatype; @@ -6449,7 +6449,7 @@ if ((f.frametype == AST_FRAME_IAX) && ((f.subclass == IAX_COMMAND_NEW) || (f.subclass == IAX_COMMAND_REGREQ) || (f.subclass == IAX_COMMAND_POKE) || (f.subclass == IAX_COMMAND_FWDOWNL) || (f.subclass == IAX_COMMAND_REGREL))) - new = NEW_ALLOW; + newflag = NEW_ALLOW; } else { /* Don't know anything about it yet */ f.frametype = AST_FRAME_NULL; @@ -6457,7 +6457,7 @@ } if (!fr->callno) - fr->callno = find_callno(ntohs(mh->callno) & ~IAX_FLAG_FULL, dcallno, &sin, new, 1, fd); + fr->callno = find_callno(ntohs(mh->callno) & ~IAX_FLAG_FULL, dcallno, &sin, newflag, 1, fd); if (fr->callno > 0) ast_mutex_lock(&iaxsl[fr->callno]);