summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcnst <cnst@openbsd.org>2008-06-14 00:16:10 +0000
committercnst <cnst@openbsd.org>2008-06-14 00:16:10 +0000
commitead3479740ee41078ddf7d553673e7de5dc370da (patch)
treeb2a48b60946cfd7c6a8754eed0afacaa462d4b91
parentimplement a check code to determine whether the disk keys have (diff)
downloadwireguard-openbsd-ead3479740ee41078ddf7d553673e7de5dc370da.tar.xz
wireguard-openbsd-ead3479740ee41078ddf7d553673e7de5dc370da.zip
When there are no sensors, don't run the hotplugging consistency check,
the logic of which assumes that there is at least one sdlim. ok henning
-rw-r--r--usr.sbin/sensorsd/sensorsd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/sensorsd/sensorsd.c b/usr.sbin/sensorsd/sensorsd.c
index a358b3cae7e..3f05428ab7e 100644
--- a/usr.sbin/sensorsd/sensorsd.c
+++ b/usr.sbin/sensorsd/sensorsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensorsd.c,v 1.45 2008/06/11 21:21:50 cnst Exp $ */
+/* $OpenBSD: sensorsd.c,v 1.46 2008/06/14 00:16:10 cnst Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -309,6 +309,8 @@ check(time_t this_check)
check_sdlim(sdlim, this_check);
}
+ if (TAILQ_EMPTY(&sdlims))
+ return;
/* Ensure that our queue is consistent. */
for (sdlim = TAILQ_FIRST(&sdlims);
(next = TAILQ_NEXT(sdlim, entries)) != NULL;