summaryrefslogtreecommitdiff
path: root/allchblk.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2021-06-13 11:56:02 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-06-13 11:56:02 +0300
commit544558254a313c975c52126bb4284974fa75c1fb (patch)
tree20336877263a0b8569b52eeb07dc2a091aeee289 /allchblk.c
parent6e115ed209782f0d34f577628109590b564c71d4 (diff)
downloadbdwgc-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/allchblk.c b/allchblk.c
index 282089cd..235310d8 100644
--- a/allchblk.c
+++ b/allchblk.c
@@ -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 */