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 | |
parent | daefbfe691fdc1856fd7ff91e50cd3600140359b (diff) | |
download | tor-1cd90948ab6b82f65600ed9bae45a201dfae4a3d.tar.gz tor-1cd90948ab6b82f65600ed9bae45a201dfae4a3d.zip |
maybe appease the overflow detectors more
svn:r13663
-rw-r--r-- | src/common/container.h | 1 | ||||
-rw-r--r-- | src/or/connection_edge.c | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/common/container.h b/src/common/container.h index db53dcb71b..07779aae13 100644 --- a/src/common/container.h +++ b/src/common/container.h @@ -292,7 +292,6 @@ DECLARE_MAP_FNS(digestmap_t, const char *, digestmap_); MAP_FOREACH_MODIFY(strmap_, map, const char *, keyvar, valtype, valvar) #define STRMAP_FOREACH_END MAP_FOREACH_END - void* strmap_set_lc(strmap_t *map, const char *key, void *val); void* strmap_get_lc(const strmap_t *map, const char *key); void* strmap_remove_lc(strmap_t *map, const char *key); 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; |