summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gc.c2
-rw-r--r--gc.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/gc.c b/gc.c
index 311f66d2..0c727ed4 100644
--- a/gc.c
+++ b/gc.c
@@ -606,7 +606,7 @@ static int sweep_one(obj_t *block)
#if CONFIG_GEN_GC
block->t.gen = 1;
#endif
- block->t.type &= convert(type_t, ~REACHABLE);
+ block->t.type = convert(type_t, block->t.type & ~REACHABLE);
return 0;
}
diff --git a/gc.h b/gc.h
index 6103781a..a575ec88 100644
--- a/gc.h
+++ b/gc.h
@@ -66,8 +66,8 @@ extern val break_obj;
#endif
#define gc_hint(var) gc_hint_func(&var)
-#define REACHABLE 0x100
-#define FREE 0x200
+#define REACHABLE 0x100U
+#define FREE 0x200U
INLINE val zap(volatile val *loc) { val ret = *loc; *loc = nil; return ret; }