Index: channels/chan_phone.c =================================================================== --- channels/chan_phone.c (revision 66997) +++ 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 = { @@ -230,11 +230,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_sip.c =================================================================== --- channels/chan_sip.c (revision 66997) +++ channels/chan_sip.c (working copy) @@ -1422,7 +1422,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[]); @@ -5955,7 +5955,7 @@ int start = 0; for (;;) { - char new[256]; + char buf[256]; const char *oh = __get_header(orig, field, &start); if (ast_strlen_zero(oh)) @@ -5991,17 +5991,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++; @@ -10573,14 +10573,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 66997) +++ channels/chan_iax2.c (working copy) @@ -1177,18 +1177,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 @@ -1305,13 +1305,13 @@ * a better way of indexing active calls so that these frequent lookups are not * so expensive. */ -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) { 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, @@ -5396,20 +5396,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; @@ -5840,7 +5840,7 @@ iax_ie_append_addr(&ied, IAX_IE_APPARENT_ADDR, &p->addr); if (!ast_strlen_zero(p->mailbox)) { struct ast_event *event; - int new, old; + int newmsgs, oldmsgs; event = ast_event_get_cached(AST_EVENT_MWI, AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_STR, p->mailbox, @@ -5848,17 +5848,17 @@ AST_EVENT_IE_OLDMSGS, AST_EVENT_IE_PLTYPE_EXISTS, AST_EVENT_IE_END); if (event) { - new = ast_event_get_ie_uint(event, AST_EVENT_IE_NEWMSGS); - old = ast_event_get_ie_uint(event, AST_EVENT_IE_OLDMSGS); + newmsgs = ast_event_get_ie_uint(event, AST_EVENT_IE_NEWMSGS); + oldmsgs = ast_event_get_ie_uint(event, AST_EVENT_IE_OLDMSGS); ast_event_destroy(event); } else /* Fall back on checking the mailbox directly */ - ast_app_inboxcount(p->mailbox, &new, &old); + ast_app_inboxcount(p->mailbox, &newmsgs, &oldmsgs); - if (new > 255) - new = 255; - if (old > 255) - old = 255; - msgcount = (old << 8) | new; + if (newmsgs > 255) + newmsgs = 255; + if (oldmsgs > 255) + oldmsgs = 255; + msgcount = (oldmsgs << 8) | newmsgs; iax_ie_append_short(&ied, IAX_IE_MSGCOUNT, msgcount); } @@ -6626,7 +6626,7 @@ struct sockaddr_in sin; int res; int updatehistory=1; - int new = NEW_PREVENT; + int newflag = NEW_PREVENT; int dcallno = 0; struct ast_iax2_full_hdr *fh = (struct ast_iax2_full_hdr *)thread->buf; struct ast_iax2_mini_hdr *mh = (struct ast_iax2_mini_hdr *)thread->buf; @@ -6671,7 +6671,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)) return socket_process_meta(res, meta, &sin, fd, fr); @@ -6698,7 +6698,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; @@ -6706,7 +6706,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]); Index: channels/chan_misdn.c =================================================================== --- channels/chan_misdn.c (revision 66997) +++ channels/chan_misdn.c (working copy) @@ -264,14 +264,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 66997) +++ channels/chan_skinny.c (working copy) @@ -1789,8 +1789,8 @@ static void do_housekeeping(struct skinnysession *s) { - int new; - int old; + int newmsgs; + int oldmsgs; int device_lamp = 0; struct skinny_device *d = s->device; struct skinny_line *l; @@ -1802,7 +1802,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 66997) +++ channels/chan_local.c (working copy) @@ -447,7 +447,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) @@ -469,10 +469,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); } }