summaryrefslogtreecommitdiff
path: root/sys/kern/kern_sysctl.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2023-05-21 12:47:55 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2023-05-21 12:47:55 +0000
commit595561d59e945e220964ca9c7d2d92ea911b2b95 (patch)
tree3a4dee50c1f9df10b3d07706a3deddc2c7f1572a /sys/kern/kern_sysctl.c
parent0d9fbbc1462a2dd5fc9c5d5810bcecbb29528992 (diff)
In sysctl_hwchargestop() check that hw_battery_setchargestop is set
and not hw_battery_setchargestart. OK kettenis@
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r--sys/kern/kern_sysctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index f63fc7cc420..a2d2f2e06bc 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.414 2023/05/18 10:23:19 mvs Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.415 2023/05/21 12:47:54 claudio Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -841,7 +841,7 @@ sysctl_hwchargestop(void *oldp, size_t *oldlenp, void *newp, size_t newlen)
int stop = hw_battery_chargestop;
int error;
- if (!hw_battery_setchargestart)
+ if (!hw_battery_setchargestop)
return EOPNOTSUPP;
error = sysctl_int_bounded(oldp, oldlenp, newp, newlen,