diff options
author | Roger Dingledine <arma@torproject.org> | 2008-02-21 21:56:04 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-02-21 21:56:04 +0000 |
commit | 1cd90948ab6b82f65600ed9bae45a201dfae4a3d (patch) | |
tree | 7a65b73897825c205e689d6d93812627f612dc49 /src/or/connection_edge.c | |
parent | daefbfe691fdc1856fd7ff91e50cd3600140359b (diff) | |
download | tor-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.c | 4 |
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; |