diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-07-11 12:33:51 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-07-11 12:33:51 -0700 |
commit | 22a0514369a0a377f8c5d40675fea68adaf1d333 (patch) | |
tree | 21c2895aff1a04fad3dbfd56f91878a462b80231 /lib.c | |
parent | 1c3daa4cd43f95d246b5b5312216c7195fdcded0 (diff) | |
download | txr-22a0514369a0a377f8c5d40675fea68adaf1d333.tar.gz txr-22a0514369a0a377f8c5d40675fea68adaf1d333.tar.bz2 txr-22a0514369a0a377f8c5d40675fea68adaf1d333.zip |
chk_calloc: use unsigned arithmetic.
* lib.c (chk_calloc): Use unsigned arithmetic to figure out
the total, which is only used for incrementing the
malloc_bytes counter. The unsigned arithmetic is performed in
the same type as that counter.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2839,7 +2839,7 @@ mem_t *chk_malloc_gc_more(size_t size) mem_t *chk_calloc(size_t n, size_t size) { mem_t *ptr = convert(mem_t *, calloc(n, size)); - cnum total = convert(cnum, size) * convert(cnum, n); + alloc_bytes_t total = convert(alloc_bytes_t, size) * n; assert (!async_sig_enabled); |