svn commit: r197772 - head/sys/dev/ppbus

John Baldwin jhb at FreeBSD.org
Mon Oct 5 14:13:17 UTC 2009


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;


More information about the svn-src-all mailing list