summaryrefslogtreecommitdiff
path: root/new_hblk.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-07-14 13:43:13 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:07:00 +0400
commit87c8766806a3287dd99f31e913208fdf200017cc (patch)
treefe68a0f206c404875ccff6892326a52acc12a97a /new_hblk.c
parent0e57ad67def39d7b672577499346103a4a19bdf8 (diff)
downloadbdwgc-87c8766806a3287dd99f31e913208fdf200017cc.tar.gz
2011-07-14 Ivan Maidanski <ivmai@mail.ru>
* new_hblk.c (GC_build_fl): Adjust "h" local variable cast type when setting obj_link (to prevent compiler warning); reformat the comment. * tests/test.c (reverse_test_inner): Use proper type when touching "b" and "c" local variables (to prevent compiler warning).
Diffstat (limited to 'new_hblk.c')
-rw-r--r--new_hblk.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/new_hblk.c b/new_hblk.c
index 6e2dca56..1366b131 100644
--- a/new_hblk.c
+++ b/new_hblk.c
@@ -158,12 +158,10 @@ GC_INNER ptr_t GC_build_fl(struct hblk *h, size_t sz, GC_bool clear,
}
p -= sz; /* p now points to last object */
- /*
- * put p (which is now head of list of objects in *h) as first
- * pointer in the appropriate free list for this size.
- */
- obj_link(h -> hb_body) = list;
- return ((ptr_t)p);
+ /* Put p (which is now head of list of objects in *h) as first */
+ /* pointer in the appropriate free list for this size. */
+ *(ptr_t *)h = list;
+ return ((ptr_t)p);
}
/*