aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-02-21 21:56:04 +0000
committerRoger Dingledine <arma@torproject.org>2008-02-21 21:56:04 +0000
commit1cd90948ab6b82f65600ed9bae45a201dfae4a3d (patch)
tree7a65b73897825c205e689d6d93812627f612dc49 /src/or/connection_edge.c
parentdaefbfe691fdc1856fd7ff91e50cd3600140359b (diff)
downloadtor-1cd90948ab6b82f65600ed9bae45a201dfae4a3d.tar.gz
tor-1cd90948ab6b82f65600ed9bae45a201dfae4a3d.zip
maybe appease the overflow detectors more
svn:r13663
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index fa684d8b45..52c02d89eb 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -842,8 +842,8 @@ client_dns_incr_failures(const char *address)
ent->expires = time(NULL) + MAX_DNS_ENTRY_AGE;
strmap_set(addressmap,address,ent);
}
- if (++ent->num_resolve_failures < 0) /* overflow. */
- ent->num_resolve_failures = SHORT_MAX;
+ if (ent->num_resolve_failures < SHORT_MAX)
+ ++ent->num_resolve_failures; /* don't overflow */
log_info(LD_APP, "Address %s now has %d resolve failures.",
safe_str(address), ent->num_resolve_failures);
return ent->num_resolve_failures;