From owner-cvs-src@FreeBSD.ORG Thu Feb 17 21:05:04 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BEF2916A4CE; Thu, 17 Feb 2005 21:05:04 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7D9A43D4C; Thu, 17 Feb 2005 21:05:04 +0000 (GMT) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j1HL54hu048713; Thu, 17 Feb 2005 21:05:04 GMT (envelope-from imp@repoman.freebsd.org) Received: (from imp@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j1HL54rD048712; Thu, 17 Feb 2005 21:05:04 GMT (envelope-from imp) Message-Id: <200502172105.j1HL54rD048712@repoman.freebsd.org> From: Warner Losh Date: Thu, 17 Feb 2005 21:05:04 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/pccard pccard_cis.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2005 21:05:04 -0000 imp 2005-02-17 21:05:04 UTC FreeBSD src repository Modified files: sys/dev/pccard pccard_cis.c Log: memspace is set to some value by masking off bits. When these bits are equal to PCCARD_TPCE_FS_MEMSPACE_NONE, memspace will be zero, so testing for this case inside of the if statement results in dead code. We'd fail to set a value to zero that's already zero (since it is initialized to 0 indirectly) with this code being there. Well, except in the very rare case that we have a card that has a defualt entry that includes a memory space followed by one that has no memory space (these are extremely rare, I don't recall ever having seen one :-). Fix this by setting num_memspace to 0 in a more appropriate place. Submitted by: Coverity Prevent analysis tool Revision Changes Path 1.31 +3 -4 src/sys/dev/pccard/pccard_cis.c