svn commit: r198908 - stable/7/sys/dev/ppbus

John Baldwin jhb at FreeBSD.org
Wed Nov 4 16:59:21 UTC 2009


Author: jhb
Date: Wed Nov  4 16:59:21 2009
New Revision: 198908
URL: http://svn.freebsd.org/changeset/base/198908

Log:
  MFC 197772:
  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.

Modified:
  stable/7/sys/dev/ppbus/lpt.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/ppbus/lpt.c
==============================================================================
--- stable/7/sys/dev/ppbus/lpt.c	Wed Nov  4 16:58:26 2009	(r198907)
+++ stable/7/sys/dev/ppbus/lpt.c	Wed Nov  4 16:59:21 2009	(r198908)
@@ -437,7 +437,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;
 		timeout(lptout, (caddr_t)dev, sc->sc_backoff);
 	} else
 		sc->sc_state &= ~TOUT;


More information about the svn-src-stable-7 mailing list