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>
Thu, 14 Jun 2018 08:26:41 +0000 (11:26 +0300)
* reclaim.c [!USE_MARK_BYTES] (GC_n_set_marks): Do not decrement the
result variable on return; add comment.

reclaim.c

index 90bf29a..d50369e 100644 (file)
--- a/reclaim.c
+++ b/reclaim.c
@@ -538,7 +538,7 @@ unsigned 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  */