Skip to content
Snippets Groups Projects
Commit 3f993dac authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

use ARRAY_LENGTH macro in domain_to_string

parent 377584ab
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment