1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

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
This commit is contained in:
cnst 2008-06-14 00:16:10 +00:00
parent f1072292f2
commit ead3479740

View File

@ -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;