summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorart <art@openbsd.org>2000-06-20 02:45:55 +0000
committerart <art@openbsd.org>2000-06-20 02:45:55 +0000
commit38427459092ab1a75a86bce333aed24f0eeca3d9 (patch)
tree5804e76147ea24a5a199eee755deb9d86a3c5b6e
parentBig oops on my previous commit, broke gateway function; patch from (diff)
downloadwireguard-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.c4
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. */