From owner-cvs-all Sat Jul 3 15:33: 4 1999 Delivered-To: cvs-all@freebsd.org Received: from ns.skylink.it (ns.skylink.it [194.177.113.1]) by hub.freebsd.org (Postfix) with ESMTP id 81816151DD; Sat, 3 Jul 1999 15:32:45 -0700 (PDT) (envelope-from hibma@skylink.it) Received: from heidi.plazza.it (va-158.skylink.it [194.185.55.158]) by ns.skylink.it (8.9.1/8.8.8) with ESMTP id AAA01148; Sun, 4 Jul 1999 00:31:53 +0200 Received: from localhost (localhost.plazza.it [127.0.0.1]) by heidi.plazza.it (8.8.8/8.8.5) with SMTP id AAA08968; Sun, 4 Jul 1999 00:25:05 +0200 (CEST) Date: Sun, 4 Jul 1999 00:25:05 +0200 (CEST) From: Nick Hibma X-Sender: n_hibma@heidi.plazza.it Reply-To: Nick Hibma To: Matt Jacob Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/cam/scsi scsi_da.c In-Reply-To: <199907032114.OAA69073@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk The compiler was not _that_ stupid. It just did not rewrite a/(b/c) into a*c/b which is kind of fair, if you don't want to have problems with difference in precision (int() calculations): 4/(3/2) = 4/1 = 4 != 4*2/3 = 2 Nick On Sat, 3 Jul 1999, Matt Jacob wrote: > mjacob 1999/07/03 14:14:47 PDT > > Modified files: > sys/cam/scsi scsi_da.c > Log: > Make the change similar to that suggested by Nick Hibma to avoid divide by > zero traps. I actually can't believe that this compiler is *sooooo* stupid > that it did a divide when there was 1024L*1024L instead of a right shift by > 20. When we get quad type modifiers in kernel printf we can change to this > too (to avoid overflow on > terabyte disk sizes). > > Revision Changes Path > 1.28 +4 -3 src/sys/cam/scsi/scsi_da.c > > > -- e-Mail: hibma@skylink.it To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message