diff options
author | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2008-06-14 00:16:11 +0000 |
---|---|---|
committer | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2008-06-14 00:16:11 +0000 |
commit | 27abd0daebe4b681531d6b0b5f4ee6a61c0800e0 (patch) | |
tree | f6235041d66fc53536da814ef9d461bbe285f295 /usr.sbin/sensorsd | |
parent | 994d00b05d4f1aea85721b3b4674d146136c5f9f (diff) |
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
Diffstat (limited to 'usr.sbin/sensorsd')
-rw-r--r-- | usr.sbin/sensorsd/sensorsd.c | 4 |
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; |