From: Nick Mathewson Date: Wed, 7 Nov 2007 07:33:36 +0000 (+0000) Subject: r16510@catbus: nickm | 2007-11-07 02:29:42 -0500 X-Git-Tag: release-2.0.1-alpha~517 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45c7ab25de2dea155332cc144c1f94f5c073c919;p=libevent r16510@catbus: nickm | 2007-11-07 02:29:42 -0500 Try not to shadow local variables or function arguments. svn:r498 --- diff --git a/evdns.c b/evdns.c index 9caf5d54..e1f0fba2 100644 --- a/evdns.c +++ b/evdns.c @@ -1683,8 +1683,8 @@ evdns_server_request_respond(struct evdns_server_request *_req, int err) r = sendto(port->socket, req->response, req->response_len, 0, (struct sockaddr*) &req->addr, req->addrlen); if (r<0) { - int err = last_error(port->socket); - if (! error_is_eagain(err)) + int sock_err = last_error(port->socket); + if (! error_is_eagain(sock_err)) return -1; if (port->pending_replies) { @@ -2509,7 +2509,7 @@ search_try_next(struct request *const req) { /* this name without a postfix */ if (string_num_dots(req->search_origname) < req->search_state->ndots) { /* yep, we need to try it raw */ - struct request *const newreq = request_new(req->request_type, req->search_origname, req->search_flags, req->user_callback, req->user_pointer); + newreq = request_new(req->request_type, req->search_origname, req->search_flags, req->user_callback, req->user_pointer); log(EVDNS_LOG_DEBUG, "Search: trying raw query %s", req->search_origname); if (newreq) { request_submit(newreq); diff --git a/event.c b/event.c index a800e8f0..82610c3b 100644 --- a/event.c +++ b/event.c @@ -796,8 +796,8 @@ timeout_correct(struct event_base *base, struct timeval *tv) pev = base->timeheap.p; size = base->timeheap.n; for (; size-- > 0; ++pev) { - struct timeval *tv = &(**pev).ev_timeout; - evutil_timersub(tv, &off, tv); + struct timeval *ev_tv = &(**pev).ev_timeout; + evutil_timersub(ev_tv, &off, ev_tv); } }