Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Nov 2009 16:59:21 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r198908 - stable/7/sys/dev/ppbus
Message-ID:  <200911041659.nA4GxL7n039244@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911041659.nA4GxL7n039244>