MCPcopy Index your code
hub / github.com/NetHack/NetHack / dealloc_killer

Function dealloc_killer

src/end.c:1737–1757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1735}
1736
1737void
1738dealloc_killer(struct kinfo *kptr)
1739{
1740 struct kinfo *prev = &svk.killer, *k;
1741
1742 if (kptr == (struct kinfo *) 0)
1743 return;
1744 for (k = svk.killer.next; k != (struct kinfo *) 0; k = k->next) {
1745 if (k == kptr)
1746 break;
1747 prev = k;
1748 }
1749
1750 if (k == (struct kinfo *) 0) {
1751 impossible("dealloc_killer (#%d) not on list", kptr->id);
1752 } else {
1753 prev->next = k->next;
1754 free((genericptr_t) k);
1755 debugpline1("freed delayed killer #%d", kptr->id);
1756 }
1757}
1758
1759void
1760save_killers(NHFILE *nhfp)

Callers 6

make_sickFunction · 0.85
make_slimedFunction · 0.85
make_stonedFunction · 0.85
slimed_to_deathFunction · 0.85
nh_timeoutFunction · 0.85
polymanFunction · 0.85

Calls 1

impossibleFunction · 0.70

Tested by

no test coverage detected