Skip to content

Commit

Permalink
gasman: use IS_BAG_BODY in CallbackForAllBags
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jan 8, 2018
1 parent d88b829 commit 43a61ec
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/gasman.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,15 +672,13 @@ void MarkBagWeakly(Bag bag)
** walking the masterpointer area. Not terribly safe.
**
*/
void CallbackForAllBags(
void (*func)(Bag) )
void CallbackForAllBags(void (*func)(Bag))
{
Bag ptr;
for (ptr = (Bag)MptrBags; ptr < (Bag)OldBags; ptr ++)
if (*ptr != 0 && !IS_WEAK_DEAD_BAG(ptr) && (Bag)(*ptr) >= (Bag)OldBags)
{
(*func)(ptr);
}
for (Bag bag = (Bag)MptrBags; bag < (Bag)OldBags; bag++) {
if (IS_BAG_BODY(*bag)) {
(*func)(bag);
}
}
}


Expand Down

0 comments on commit 43a61ec

Please sign in to comment.