diff options
author | Jasper Lievisse Adriaanse <jasper@humppa.nl> | 2016-05-04 11:13:53 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-09-08 18:20:52 +0200 |
commit | ad75f189d2af88019b8d1197dce2754f36719e9a (patch) | |
tree | 465215191dc60fde1390f7c9d99b585bc268a875 /src | |
parent | e4b85ef5df2f48ae28ccd0a6feb6a652baf8c285 (diff) |
openbsd: Remove SENSOR_MAX_TYPES upper bound
Remove pointless upperbound, SENSOR_MAX_TYPES has no meaning here
and we break from the loop anyway when needed (i.e. when ENOENT
is returned). This aligns the code with other sensor device
walkers in OpenBSD.
https://bugs.freedesktop.org/show_bug.cgi?id=95257
Diffstat (limited to 'src')
-rw-r--r-- | src/openbsd/up-backend.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openbsd/up-backend.c b/src/openbsd/up-backend.c index 41a0109..b59d1a7 100644 --- a/src/openbsd/up-backend.c +++ b/src/openbsd/up-backend.c @@ -461,7 +461,7 @@ up_backend_update_lid_status(UpDaemon *daemon) { /* go through all acpibtn devices, and check if one of the values match "lid" if so, use that device. */ - for (dev = 0; SENSOR_MAX_TYPES; dev++) { + for (dev = 0; ; dev++) { mib[2] = dev; if (sysctl(mib, 3, &sensordev, &sdlen, NULL, 0) == -1) { if (errno == ENXIO) |