summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-05-09 04:53:52 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-05-09 04:53:52 +0000
commitd66aeef4258ea7d58ae2a6769926223aa105f547 (patch)
tree9d01dbac0ce0588d9878e3a915bfe8de42875f73 /usr.sbin
parentd185bf136b0349194d17c2484fe3a1a6dd29482f (diff)
Do not log useless messages if the apm implementation returns -1 in the
minutes_left field of the apm_power_info struct.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/apmd/apmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c
index 6ce012c8e68..b03638021c0 100644
--- a/usr.sbin/apmd/apmd.c
+++ b/usr.sbin/apmd/apmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apmd.c,v 1.32 2005/03/10 22:42:46 deraadt Exp $ */
+/* $OpenBSD: apmd.c,v 1.33 2005/05/09 04:53:51 miod Exp $ */
/*
* Copyright (c) 1995, 1996 John T. Kohl
@@ -142,7 +142,7 @@ power_status(int fd, int force, struct apm_power_info *pinfo)
if (bstate.minutes_left != 0 &&
bstate.battery_state != APM_BATT_CHARGING)
#else
- if (bstate.minutes_left)
+ if ((int)bstate.minutes_left > 0)
#endif
syslog(LOG_NOTICE, "battery status: %s. "
"external power status: %s. "