diff options
author | 2000-06-20 02:45:55 +0000 | |
---|---|---|
committer | 2000-06-20 02:45:55 +0000 | |
commit | 38427459092ab1a75a86bce333aed24f0eeca3d9 (patch) | |
tree | 5804e76147ea24a5a199eee755deb9d86a3c5b6e | |
parent | Big oops on my previous commit, broke gateway function; patch from (diff) | |
download | wireguard-openbsd-38427459092ab1a75a86bce333aed24f0eeca3d9.tar.xz wireguard-openbsd-38427459092ab1a75a86bce333aed24f0eeca3d9.zip |
timeout_add: Remove the right timeout when we see that it is on the list.
-rw-r--r-- | sys/kern/kern_timeout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index 2ef8ecffe3a..3e68f1e1415 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_timeout.c,v 1.4 2000/05/08 01:28:59 mickey Exp $ */ +/* $OpenBSD: kern_timeout.c,v 1.5 2000/06/20 02:45:55 art Exp $ */ /* * Copyright (c) 2000 Artur Grabowski <art@openbsd.org> * All rights reserved. @@ -129,7 +129,7 @@ timeout_add(new, to_ticks) /* If this timeout was already on a queue we remove it. */ if (new->to_flags & TIMEOUT_ONQUEUE) - TAILQ_REMOVE(&timeout_todo, to, to_list); + TAILQ_REMOVE(&timeout_todo, new, to_list); else new->to_flags |= TIMEOUT_ONQUEUE; /* Initialize the time here, it won't change. */ |