From owner-svn-src-all@FreeBSD.ORG Tue Sep 8 16:37:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 740FC1065672; Tue, 8 Sep 2009 16:37:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62E308FC0A; Tue, 8 Sep 2009 16:37:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n88GbJBt053591; Tue, 8 Sep 2009 16:37:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n88GbJeq053589; Tue, 8 Sep 2009 16:37:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200909081637.n88GbJeq053589@svn.freebsd.org> From: Warner Losh Date: Tue, 8 Sep 2009 16:37:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196984 - head/sys/dev/ep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 16:37:19 -0000 Author: imp Date: Tue Sep 8 16:37:18 2009 New Revision: 196984 URL: http://svn.freebsd.org/changeset/base/196984 Log: Cleanup tortured logic a big. Noticed by FlexLint, per phk. # My reading of the docs suggests this can only happen on 10Base5 and # 10Base2 setups (and maybe only the former), which I can't test # adequately since I have nothing but 10BaseT, etc here. Modified: head/sys/dev/ep/if_ep.c Modified: head/sys/dev/ep/if_ep.c ============================================================================== --- head/sys/dev/ep/if_ep.c Tue Sep 8 16:09:28 2009 (r196983) +++ head/sys/dev/ep/if_ep.c Tue Sep 8 16:37:18 2009 (r196984) @@ -665,14 +665,13 @@ rescan: #ifdef EP_LOCAL_STATS sc->tx_underrun++; #endif - } else { - if (status & TXS_JABBER); - else - ++ifp->if_collisions; - /* TXS_MAX_COLLISION - * we shouldn't get - * here - */ + } + if (status & TXS_MAX_COLLISION) { + /* + * TXS_MAX_COLLISION we + * shouldn't get here + */ + ++ifp->if_collisions; } ++ifp->if_oerrors; CSR_WRITE_2(sc, EP_COMMAND, TX_ENABLE);