Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/isa fix sequence point errors. diff explains best:



details:   https://anonhg.NetBSD.org/src/rev/2484ecf41163
branches:  trunk
changeset: 766801:2484ecf41163
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sat Jul 02 13:14:46 2011 +0000

description:
fix sequence point errors.  diff explains best:
-       sc->sc_playbuf = ++sc->sc_playbuf % sc->sc_nbufs;
+       sc->sc_playbuf = (sc->sc_playbuf + 1) % sc->sc_nbufs;

diffstat:

 sys/dev/isa/gus.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r e3f1854327a8 -r 2484ecf41163 sys/dev/isa/gus.c
--- a/sys/dev/isa/gus.c Sat Jul 02 13:13:22 2011 +0000
+++ b/sys/dev/isa/gus.c Sat Jul 02 13:14:46 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gus.c,v 1.105 2009/05/12 09:10:15 cegger Exp $ */
+/*     $NetBSD: gus.c,v 1.106 2011/07/02 13:14:46 mrg Exp $    */
 
 /*-
  * Copyright (c) 1996, 1999 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gus.c,v 1.105 2009/05/12 09:10:15 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gus.c,v 1.106 2011/07/02 13:14:46 mrg Exp $");
 
 #include "gus.h"
 #if NGUS > 0
@@ -1648,7 +1648,7 @@
         * flip to the next DMA buffer
         */
 
-       sc->sc_dmabuf = ++sc->sc_dmabuf % sc->sc_nbufs;
+       sc->sc_dmabuf = (sc->sc_dmabuf + 1) % sc->sc_nbufs;
        /*
         * See comments below about DMA admission control strategy.
         * We can call the upper level here if we have an
@@ -1744,7 +1744,7 @@
                                               device_xname(&sc->sc_dev), sc->sc_bufcnt);
                                        gus_falsestops++;
 
-                                       sc->sc_playbuf = ++sc->sc_playbuf % sc->sc_nbufs;
+                                       sc->sc_playbuf = (sc->sc_playbuf + 1) % sc->sc_nbufs;
                                        gus_start_playing(sc, sc->sc_playbuf);
                                } else if (sc->sc_bufcnt < 0) {
                                        panic("%s: negative bufcnt in stopped voice",
@@ -1919,7 +1919,7 @@
         * update playbuf to point to the buffer the hardware just started
         * playing
         */
-       sc->sc_playbuf = ++sc->sc_playbuf % sc->sc_nbufs;
+       sc->sc_playbuf = (sc->sc_playbuf + 1) % sc->sc_nbufs;
 
        /*
         * account for buffer just finished



Home | Main Index | Thread Index | Old Index