Date: Mon, 5 Oct 2009 14:13:16 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r197772 - head/sys/dev/ppbus Message-ID: <200910051413.n95EDGXN014646@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Mon Oct 5 14:13:16 2009 New Revision: 197772 URL: http://svn.freebsd.org/changeset/base/197772 Log: When the timeout backoff hits the maximum value, leave it capped at the maximum value rather than setting it to the result of a boolean expression that is always true. Submitted by: Joseph Kong MFC after: 1 month Modified: head/sys/dev/ppbus/lpt.c Modified: head/sys/dev/ppbus/lpt.c ============================================================================== --- head/sys/dev/ppbus/lpt.c Mon Oct 5 14:03:26 2009 (r197771) +++ head/sys/dev/ppbus/lpt.c Mon Oct 5 14:13:16 2009 (r197772) @@ -456,7 +456,7 @@ lptout(void *arg) if (sc->sc_state & OPEN) { sc->sc_backoff++; if (sc->sc_backoff > hz/LPTOUTMAX) - sc->sc_backoff = sc->sc_backoff > hz/LPTOUTMAX; + sc->sc_backoff = hz/LPTOUTMAX; callout_reset(&sc->sc_timer, sc->sc_backoff, lptout, sc); } else sc->sc_state &= ~TOUT;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910051413.n95EDGXN014646>