diff options
author | Rich Salz <rsalz@openssl.org> | 2017-12-08 15:17:12 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-12-08 15:17:12 -0500 |
commit | a836f9fa951e33a5186e2421413de0b50ed2233a (patch) | |
tree | 15990a5d69da679ff48420e965abd4a5b3b98a03 /crypto/mem_dbg.c | |
parent | 62f494408dc87a264ecb8e94b59dde42d52dfefd (diff) |
Standardize syntax of sizeof(foo)
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4876)
Diffstat (limited to 'crypto/mem_dbg.c')
-rw-r--r-- | crypto/mem_dbg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c index dc3f8ff571..c884078e77 100644 --- a/crypto/mem_dbg.c +++ b/crypto/mem_dbg.c @@ -466,7 +466,7 @@ static void print_leak(const MEM *m, MEM_LEAK *l) } tid; CRYPTO_THREAD_ID ti; -#define BUF_REMAIN (sizeof buf - (size_t)(bufp - buf)) +#define BUF_REMAIN (sizeof(buf) - (size_t)(bufp - buf)) lcl = localtime(&m->time); BIO_snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ", @@ -505,7 +505,7 @@ static void print_leak(const MEM *m, MEM_LEAK *l) memset(buf, '>', ami_cnt); tid.ltid = 0; tid.tid = amip->threadid; - BIO_snprintf(buf + ami_cnt, sizeof buf - ami_cnt, + BIO_snprintf(buf + ami_cnt, sizeof(buf) - ami_cnt, " thread=%lu, file=%s, line=%d, info=\"", tid.ltid, amip->file, amip->line); @@ -515,10 +515,10 @@ static void print_leak(const MEM *m, MEM_LEAK *l) memcpy(buf + buf_len, amip->info, 128 - buf_len - 3); buf_len = 128 - 3; } else { - OPENSSL_strlcpy(buf + buf_len, amip->info, sizeof buf - buf_len); + OPENSSL_strlcpy(buf + buf_len, amip->info, sizeof(buf) - buf_len); buf_len = strlen(buf); } - BIO_snprintf(buf + buf_len, sizeof buf - buf_len, "\"\n"); + BIO_snprintf(buf + buf_len, sizeof(buf) - buf_len, "\"\n"); BIO_puts(l->bio, buf); |