mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 15:10:48 +01:00
Use the standard SHRT_MAX name.
This commit is contained in:
parent
c75215c23a
commit
4638be5312
2 changed files with 1 additions and 6 deletions
|
@ -95,10 +95,6 @@ typedef int32_t ssize_t;
|
||||||
#endif /* (SIZEOF_SIZE_T == 4) || ... */
|
#endif /* (SIZEOF_SIZE_T == 4) || ... */
|
||||||
#endif /* !defined(SIZE_MAX) */
|
#endif /* !defined(SIZE_MAX) */
|
||||||
|
|
||||||
#ifndef SHORT_MAX
|
|
||||||
#define SHORT_MAX SHRT_MAX
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# ifdef _WIN64
|
# ifdef _WIN64
|
||||||
# define TOR_PRIuSZ PRIu64
|
# define TOR_PRIuSZ PRIu64
|
||||||
|
|
|
@ -642,7 +642,7 @@ client_dns_incr_failures(const char *address)
|
||||||
ent->expires = time(NULL) + MAX_DNS_ENTRY_AGE;
|
ent->expires = time(NULL) + MAX_DNS_ENTRY_AGE;
|
||||||
strmap_set(addressmap,address,ent);
|
strmap_set(addressmap,address,ent);
|
||||||
}
|
}
|
||||||
if (ent->num_resolve_failures < SHORT_MAX)
|
if (ent->num_resolve_failures < SHRT_MAX)
|
||||||
++ent->num_resolve_failures; /* don't overflow */
|
++ent->num_resolve_failures; /* don't overflow */
|
||||||
log_info(LD_APP, "Address %s now has %d resolve failures.",
|
log_info(LD_APP, "Address %s now has %d resolve failures.",
|
||||||
safe_str_client(address),
|
safe_str_client(address),
|
||||||
|
@ -1153,4 +1153,3 @@ addressmap_get_mappings(smartlist_t *sl, time_t min_expires,
|
||||||
iter = strmap_iter_next(addressmap,iter);
|
iter = strmap_iter_next(addressmap,iter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue