diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2021-06-13 11:56:02 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2021-06-13 11:56:02 +0300 |
commit | 544558254a313c975c52126bb4284974fa75c1fb (patch) | |
tree | 20336877263a0b8569b52eeb07dc2a091aeee289 /allchblk.c | |
parent | 6e115ed209782f0d34f577628109590b564c71d4 (diff) | |
download | bdwgc-544558254a313c975c52126bb4284974fa75c1fb.tar.gz |
Eliminate '(long)size<=0 is always false' cppcheck FP
* allchblk.c (GC_freehblk): Replace (signed_word)size<=0 with
(size&SIGNB)!=0.
Diffstat (limited to 'allchblk.c')
-rw-r--r-- | allchblk.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -938,7 +938,7 @@ GC_INNER void GC_freehblk(struct hblk *hbp) GET_HDR(hbp, hhdr); size = HBLKSIZE * OBJ_SZ_TO_BLOCKS(hhdr->hb_sz); - if ((signed_word)size <= 0) + if ((size & SIGNB) != 0) ABORT("Deallocating excessively large block. Too large an allocation?"); /* Probably possible if we try to allocate more than half the address */ /* space at once. If we don't catch it here, strange things happen */ |