Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Sep 2013 02:26:57 +0000 (UTC)
From:      Bryan Venteicher <bryanv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r255166 - head/sys/dev/virtio
Message-ID:  <201309030226.r832Qvst036972@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bryanv
Date: Tue Sep  3 02:26:57 2013
New Revision: 255166
URL: http://svnweb.freebsd.org/changeset/base/255166

Log:
  Fix unintended compiler constant folding
  
  Pointed out by:	dim@

Modified:
  head/sys/dev/virtio/virtqueue.c

Modified: head/sys/dev/virtio/virtqueue.c
==============================================================================
--- head/sys/dev/virtio/virtqueue.c	Tue Sep  3 00:42:15 2013	(r255165)
+++ head/sys/dev/virtio/virtqueue.c	Tue Sep  3 02:26:57 2013	(r255166)
@@ -449,10 +449,10 @@ virtqueue_postpone_intr(struct virtqueue
 
 	switch (hint) {
 	case VQ_POSTPONE_SHORT:
-		ndesc /= 4;
+		ndesc = ndesc / 4;
 		break;
 	case VQ_POSTPONE_LONG:
-		ndesc *= 3 / 4;
+		ndesc = (ndesc * 3) / 4;
 		break;
 	case VQ_POSTPONE_EMPTIED:
 		break;



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