diff options
| author | pgoyette <pgoyette@NetBSD.org> | 2010-03-26 21:06:25 +0000 |
|---|---|---|
| committer | pgoyette <pgoyette@NetBSD.org> | 2010-03-26 21:06:25 +0000 |
| commit | 6c1f2c419a73df878d58c2d6c74556be3529ca66 (patch) | |
| tree | 827f2e7747d36349c3b54ea7ea1b56e04bb87b72 /sys/dev | |
| parent | 06aa1abd0068e579d5989c6cd7683c7ace14d6da (diff) | |
Make this work the way the preceeding comment blocks says it works, and
break out of the while{ } when the callback returns false, not when it
returns true!
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/sysmon/sysmon_envsys.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/sysmon/sysmon_envsys.c b/sys/dev/sysmon/sysmon_envsys.c index 1a19381d3d0..f0c62ca397f 100644 --- a/sys/dev/sysmon/sysmon_envsys.c +++ b/sys/dev/sysmon/sysmon_envsys.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys.c,v 1.100 2010/03/26 20:31:06 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys.c,v 1.101 2010/03/26 21:06:25 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -64,7 +64,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.100 2010/03/26 20:31:06 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.101 2010/03/26 21:06:25 pgoyette Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -2021,7 +2021,7 @@ sysmon_envsys_foreach_sensor(bool(*func)(struct sysmon_envsys *, mutex_enter(&sme->sme_mtx); TAILQ_FOREACH(sensor, &sme->sme_sensors_list, sensors_head) { - if ((*func)(sme, sensor, arg)) + if (!(*func)(sme, sensor, arg)) break; } mutex_exit(&sme->sme_mtx); |
