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

Function remove_timer

src/timeout.c:2482–2502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2480}
2481
2482staticfn timer_element *
2483remove_timer(
2484 timer_element **base,
2485 short func_index,
2486 anything *arg)
2487{
2488 timer_element *prev, *curr;
2489
2490 for (prev = 0, curr = *base; curr; prev = curr, curr = curr->next)
2491 if (curr->func_index == func_index && curr->arg.a_void == arg->a_void)
2492 break;
2493
2494 if (curr) {
2495 if (prev)
2496 prev->next = curr->next;
2497 else
2498 *base = curr->next;
2499 }
2500
2501 return curr;
2502}
2503
2504staticfn void
2505write_timer(NHFILE *nhfp, timer_element *timer)

Callers 1

stop_timerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected