summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2006-04-01 20:09:13 +0000
committerhenning <henning@openbsd.org>2006-04-01 20:09:13 +0000
commitc9edb9d52d7bcb48c84d94060a6b8b10ef439754 (patch)
tree7de5654b910f79eb74b73516a44c872409267730
parentDon't convert off_t to size_t without checking if it fits. From Tobias (diff)
downloadwireguard-openbsd-c9edb9d52d7bcb48c84d94060a6b8b10ef439754.tar.xz
wireguard-openbsd-c9edb9d52d7bcb48c84d94060a6b8b10ef439754.zip
when I initially hacked sensorsd, sensors started at hw.sensors.0 and
there were no gaps ever. these days, we can have holes or start later. so on start scan 0..255 and do not abort if there's no entry, probe 'em all. found and analyzed by Sam Chill <samchill@gmail.com>, ok theo
-rw-r--r--usr.sbin/sensorsd/sensorsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/sensorsd/sensorsd.c b/usr.sbin/sensorsd/sensorsd.c
index 79b3b176597..e61433ea46c 100644
--- a/usr.sbin/sensorsd/sensorsd.c
+++ b/usr.sbin/sensorsd/sensorsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensorsd.c,v 1.21 2006/03/20 15:19:03 dhill Exp $ */
+/* $OpenBSD: sensorsd.c,v 1.22 2006/04/01 20:09:13 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -106,7 +106,7 @@ main(int argc, char *argv[])
if (sysctl(mib, 3, &sensor, &len, NULL, 0) == -1) {
if (errno != ENOENT)
warn("sysctl");
- break;
+ continue;
}
if (sensor.flags & SENSOR_FINVALID)
continue;