diff options
author | Roger Dingledine <arma@torproject.org> | 2006-08-14 07:08:29 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-08-14 07:08:29 +0000 |
commit | bf10d8a06a83962a5a8745e22fbfe31ef57dbb4d (patch) | |
tree | 96e23a68d647e94ea7d9641c79dc9d4533388a20 /src | |
parent | c33fb05de06f1654ca53065166b4cb6d4e3eb73b (diff) | |
download | tor-bf10d8a06a83962a5a8745e22fbfe31ef57dbb4d.tar tor-bf10d8a06a83962a5a8745e22fbfe31ef57dbb4d.tar.gz |
simplify compare_cached_resolves_by_expiry() to make it match
the idioms of other compare functions. hopefully i didn't
break it?
svn:r7048
Diffstat (limited to 'src')
-rw-r--r-- | src/or/connection_edge.c | 2 | ||||
-rw-r--r-- | src/or/dns.c | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index dac0a5c89..0131b066b 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -321,7 +321,7 @@ connection_edge_finished_connecting(edge_connection_t *edge_conn) * application connections. Rather than waiting a fixed amount of * time between each retry, we wait only 5 seconds for the first, * 10 seconds for the second, and 15 seconds for each retry after - * that. Hopefully this will improve the expected experience. */ + * that. Hopefully this will improve the expected user experience. */ static int compute_socks_timeout(edge_connection_t *conn) { diff --git a/src/or/dns.c b/src/or/dns.c index 54b784f7d..c5ef7befe 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -208,12 +208,7 @@ static int _compare_cached_resolves_by_expiry(const void *_a, const void *_b) { const cached_resolve_t *a = _a, *b = _b; - if (a->expire < b->expire) - return -1; - else if (a->expire == b->expire) - return 0; - else - return 1; + return a->expire - b->expire; } /** Priority queue of cached_resolve_t objects to let us know when they |