]> 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>
Sun, 8 Jul 2018 21:06:25 +0000 (00:06 +0300)
* reclaim.c [!USE_MARK_BYTES] (GC_n_set_marks): Do not decrement the
result variable on return; add comment.

reclaim.c

index b8276ee174fa9bd39145aaf15602634570abe942..1b2268b3921aba7e1673a8df2ec1de29de31c20a 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  */