diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-02-05 11:01:13 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-02-05 11:01:13 -0500 |
commit | 3f993dacc141a105d3e520cf1901dbb635c29ea2 (patch) | |
tree | 8d1b194ca27052f341b8e0bbd1466a5a3c71f762 /src/common/log.c | |
parent | 377584abbd56ab6d585ccde893398068ada8fdaa (diff) | |
download | tor-3f993dacc141a105d3e520cf1901dbb635c29ea2.tar.gz tor-3f993dacc141a105d3e520cf1901dbb635c29ea2.zip |
use ARRAY_LENGTH macro in domain_to_string
Diffstat (limited to 'src/common/log.c')
-rw-r--r-- | src/common/log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/log.c b/src/common/log.c index b533814844..bbad7f1dac 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -1246,7 +1246,7 @@ domain_to_string(log_domain_mask_t domain, char *buf, size_t buflen) const char *d; int bit = tor_log2(domain); size_t n; - if ((unsigned)bit >= sizeof(domain_list)/sizeof(*domain_list) - 1 || + if ((unsigned)bit >= ARRAY_LENGTH(domain_list)-1 || bit >= N_LOGGING_DOMAINS) { tor_snprintf(buf, buflen, "<BUG:Unknown domain %lx>", (long)domain); return buf+strlen(buf); |