Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbmips/loongson/dev PR/50869: David Binderman: Use...
details: https://anonhg.NetBSD.org/src/rev/85a48cb6db92
branches: trunk
changeset: 343882:85a48cb6db92
user: christos <christos%NetBSD.org@localhost>
date: Mon Feb 29 18:24:31 2016 +0000
description:
PR/50869: David Binderman: Use logical and instead of arithmetic
diffstat:
sys/arch/evbmips/loongson/dev/stvii.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r cb1923da5a9a -r 85a48cb6db92 sys/arch/evbmips/loongson/dev/stvii.c
--- a/sys/arch/evbmips/loongson/dev/stvii.c Mon Feb 29 18:22:06 2016 +0000
+++ b/sys/arch/evbmips/loongson/dev/stvii.c Mon Feb 29 18:24:31 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: stvii.c,v 1.4 2013/02/28 13:21:15 macallan Exp $ */
+/* $NetBSD: stvii.c,v 1.5 2016/02/29 18:24:31 christos Exp $ */
/*-
* Copyright (C) 2011 Michael Lorenz.
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: stvii.c,v 1.4 2013/02/28 13:21:15 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: stvii.c,v 1.5 2016/02/29 18:24:31 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -303,10 +303,10 @@
nctrl = sc->sc_control & ~(STC_TRICKLE | STC_CHARGE_ENABLE);
bl = stvii_battery_level(sc);
sc->sc_bat_level = bl;
- if (charging & (bl > BAT_FULL)) {
+ if (charging && (bl > BAT_FULL)) {
/* stop charging, we're full */
charging = 0;
- } else if (!charging & (bl < BAT_LOW)) {
+ } else if (!charging && (bl < BAT_LOW)) {
charging = 1;
}
if (st & STS_AC_AVAILABLE) {
Home |
Main Index |
Thread Index |
Old Index