summaryrefslogtreecommitdiffstats
path: root/crypto/mem_dbg.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2017-12-08 15:08:43 -0500
committerRich Salz <rsalz@openssl.org>2017-12-08 15:08:43 -0500
commitc6738fd208c143939b6bb7f7ac2061c0f5ff3272 (patch)
treea270d65f499b082d936057e1201acf76c98f570a /crypto/mem_dbg.c
parenta1daedd88445397a4aebf22ba63e92c3f1977870 (diff)
Standardize syntax around sizeof(foo)
Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4875)
Diffstat (limited to 'crypto/mem_dbg.c')
-rw-r--r--crypto/mem_dbg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c
index 8525ded78c..6b69b53dde 100644
--- a/crypto/mem_dbg.c
+++ b/crypto/mem_dbg.c
@@ -635,7 +635,7 @@ static void print_leak_doall_arg(const MEM *m, MEM_LEAK *l)
struct tm *lcl = NULL;
CRYPTO_THREADID ti;
-#define BUF_REMAIN (sizeof buf - (size_t)(bufp - buf))
+#define BUF_REMAIN (sizeof(buf) - (size_t)(bufp - buf))
if (m->addr == (char *)l->bio)
return;
@@ -679,7 +679,7 @@ static void print_leak_doall_arg(const MEM *m, MEM_LEAK *l)
ami_cnt++;
memset(buf, '>', ami_cnt);
- 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=\"",
CRYPTO_THREADID_hash(&amip->threadid), amip->file,
amip->line);
@@ -689,10 +689,10 @@ static void print_leak_doall_arg(const MEM *m, MEM_LEAK *l)
memcpy(buf + buf_len, amip->info, 128 - buf_len - 3);
buf_len = 128 - 3;
} else {
- BUF_strlcpy(buf + buf_len, amip->info, sizeof buf - buf_len);
+ BUF_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);