From owner-cvs-all@FreeBSD.ORG Sat Jul 26 17:13:51 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08D0437B401; Sat, 26 Jul 2003 17:13:51 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB6A943F85; Sat, 26 Jul 2003 17:13:50 -0700 (PDT) (envelope-from robert@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h6R0Do0U035800; Sat, 26 Jul 2003 17:13:50 -0700 (PDT) (envelope-from robert@repoman.freebsd.org) Received: (from robert@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h6R0Dolw035799; Sat, 26 Jul 2003 17:13:50 -0700 (PDT) Message-Id: <200307270013.h6R0Dolw035799@repoman.freebsd.org> From: Robert Drehmel Date: Sat, 26 Jul 2003 17:13:50 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/pci ncr.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 00:13:51 -0000 robert 2003/07/26 17:13:50 PDT FreeBSD src repository Modified files: sys/pci ncr.c Log: Changed the type of the variable `qidx' from u_int8_t to int, mainly to quiet a warning emitted by GCC 3.3 about comparing a variable to a value which is larger than the former can hold. The value was checked to make sure the `np->squeue' array is not accessed behind its boundary. This worked due to possibly accidental truncation when (np->squeueput + 1) was larger than or equal to MAX_START (256) when it was assigned to `qidx'. `qidx' is used to hold the next position in the start queue for an insertion. The new type was chosen because some other code in the function ncr_freeze_devq() also uses plain integers to hold those indices. Wrapped the line after the closing parenthesis of an `if' condition. Revision Changes Path 1.176 +3 -2 src/sys/pci/ncr.c