From 27abd0daebe4b681531d6b0b5f4ee6a61c0800e0 Mon Sep 17 00:00:00 2001 From: "Constantine A. Murenin" Date: Sat, 14 Jun 2008 00:16:11 +0000 Subject: 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 --- usr.sbin/sensorsd/sensorsd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.sbin/sensorsd') 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 @@ -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; -- cgit v1.2.3