diff options
author | Andy Polyakov <appro@openssl.org> | 2015-09-30 10:36:21 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2015-10-05 09:26:19 +0200 |
commit | 5f0580ccf126a4834a406423e15da5b8a8bdf993 (patch) | |
tree | 7dbae4497530eaea157567d2642f30b26b850006 /crypto | |
parent | 21ff9ac815f363a4fc9c8dc80ca09f0a5b2f02ef (diff) |
Harmonize pointer printing and size_t-fy casts.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/bio/b_print.c | 2 | ||||
-rw-r--r-- | crypto/mem_dbg.c | 8 | ||||
-rw-r--r-- | crypto/thr_id.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c index 06cadc8a63..f49ebee436 100644 --- a/crypto/bio/b_print.c +++ b/crypto/bio/b_print.c @@ -370,7 +370,7 @@ _dopr(char **sbuffer, flags, min, max); break; case 'p': - value = (long)va_arg(args, void *); + value = (size_t)va_arg(args, void *); fmtint(sbuffer, buffer, &currlen, maxlen, value, 16, min, max, flags | DP_F_NUM); break; diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c index 10cc8931e7..2cd1169918 100644 --- a/crypto/mem_dbg.c +++ b/crypto/mem_dbg.c @@ -321,9 +321,9 @@ static IMPLEMENT_LHASH_COMP_FN(mem, MEM) static unsigned long mem_hash(const MEM *a) { - unsigned long ret; + size_t ret; - ret = (unsigned long)a->addr; + ret = (size_t)a->addr; ret = ret * 17851 + (ret >> 14) * 7 + (ret >> 4) * 251; return (ret); @@ -661,8 +661,8 @@ static void print_leak_doall_arg(const MEM *m, MEM_LEAK *l) bufp += strlen(bufp); } - BIO_snprintf(bufp, BUF_REMAIN, "number=%d, address=%08lX\n", - m->num, (unsigned long)m->addr); + BIO_snprintf(bufp, BUF_REMAIN, "number=%d, address=%p\n", + m->num, m->addr); bufp += strlen(bufp); BIO_puts(l->bio, buf); diff --git a/crypto/thr_id.c b/crypto/thr_id.c index c391fc4ac3..51088e4fb5 100644 --- a/crypto/thr_id.c +++ b/crypto/thr_id.c @@ -146,7 +146,7 @@ void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr) /* * 'ptr' can be embedded in 'val' without loss of uniqueness */ - id->val = (unsigned long)id->ptr; + id->val = (size_t)id->ptr; return; } /* |