From 52f1776b22e37e8de821e34c995c38a30da9ea14 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 25 Nov 2013 11:10:57 +0900 Subject: [PATCH] cleanup --- src/gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gc.c b/src/gc.c index 72190d00..1c9fddef 100644 --- a/src/gc.c +++ b/src/gc.c @@ -449,12 +449,12 @@ gc_sweep_phase(pic_state *pic) for (p = bp + bp->s.size; p != bp->s.ptr; p += p->s.size) { if (! gc_is_marked(p)) { if (s == NULL) { - s = t = p; + s = p; } else { t->s.ptr = p; - t = t->s.ptr; } + t = p; t->s.ptr = NULL; /* For dead objects we can safely reuse ptr field */ } gc_unmark(p);