]> granicus.if.org Git - libevent/commitdiff
r16510@catbus: nickm | 2007-11-07 02:29:42 -0500
authorNick Mathewson <nickm@torproject.org>
Wed, 7 Nov 2007 07:33:36 +0000 (07:33 +0000)
committerNick Mathewson <nickm@torproject.org>
Wed, 7 Nov 2007 07:33:36 +0000 (07:33 +0000)
 Try not to shadow local variables or function arguments.

svn:r498

evdns.c
event.c

diff --git a/evdns.c b/evdns.c
index 9caf5d540d8b143df62d4928679cd0833b9b0c3a..e1f0fba27511aae02d03692972655b9bfa96c04e 100644 (file)
--- 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 a800e8f084a31d489df98156cffd5fe8ff0d3421..82610c3bb214156a6c3de24b9f2a60df83ef3a59 100644 (file)
--- 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);
        }
 }