summaryrefslogtreecommitdiff
path: root/mallocx.c
diff options
context:
space:
mode:
Diffstat (limited to 'mallocx.c')
-rw-r--r--mallocx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mallocx.c b/mallocx.c
index 1aa45699..217988a8 100644
--- a/mallocx.c
+++ b/mallocx.c
@@ -349,8 +349,7 @@ GC_API void GC_CALL GC_generic_malloc_many(size_t lb, int k, void **result)
struct hblk * hbp;
hdr * hhdr;
- rlh += lg;
- while ((hbp = *rlh) != 0) {
+ for (rlh += lg; (hbp = *rlh) != NULL; ) {
hhdr = HDR(hbp);
*rlh = hhdr -> hb_next;
GC_ASSERT(hhdr -> hb_sz == lb);
@@ -441,7 +440,7 @@ GC_API void GC_CALL GC_generic_malloc_many(size_t lb, int k, void **result)
/* Next try to allocate a new block worth of objects of this size. */
{
struct hblk *h = GC_allochblk(lb, k, 0);
- if (h != 0) {
+ if (h /* != NULL */) { /* CPPCHECK */
if (IS_UNCOLLECTABLE(k)) GC_set_hdr_marks(HDR(h));
GC_bytes_allocd += HBLKSIZE - HBLKSIZE % lb;
# ifdef PARALLEL_MARK