]> granicus.if.org Git - gc/commitdiff
Fix result computation in n_set_marks
authorIvan Maidanski <ivmai@mail.ru>
Thu, 14 Jun 2018 08:26:41 +0000 (11:26 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 17 Jul 2018 06:03:48 +0000 (09:03 +0300)
* reclaim.c [!USE_MARK_BYTES] (GC_n_set_marks): Do not decrement the
result variable on return; add comment.

reclaim.c

index a9f77e324f85a0b9fb2aeb9d696112cacb2046d5..7e07b3dcdf0d259c2d5902e4736c04b2f50ffa26 100644 (file)
--- a/reclaim.c
+++ b/reclaim.c
@@ -527,7 +527,7 @@ int GC_n_set_marks(hdr *hhdr)
 #   else
       result += set_bits(hhdr -> hb_marks[n_mark_words - 1]);
 #   endif
-    return(result - 1);
+    return result; /* the number of set bits excluding the one past the end */
 }
 
 #endif /* !USE_MARK_BYTES  */