Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/rasops Avoid sequence point error.



details:   https://anonhg.NetBSD.org/src/rev/2579b34fdd6b
branches:  trunk
changeset: 532124:2579b34fdd6b
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri May 31 19:42:12 2002 +0000

description:
Avoid sequence point error.

diffstat:

 sys/dev/rasops/rasops_bitops.h |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r f1158d2d7b32 -r 2579b34fdd6b sys/dev/rasops/rasops_bitops.h
--- a/sys/dev/rasops/rasops_bitops.h    Fri May 31 18:54:01 2002 +0000
+++ b/sys/dev/rasops/rasops_bitops.h    Fri May 31 19:42:12 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rasops_bitops.h,v 1.7 2000/06/13 13:37:00 ad Exp $     */
+/*     $NetBSD: rasops_bitops.h,v 1.8 2002/05/31 19:42:12 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -102,8 +102,10 @@
                        dp = rp;
                        DELTA(rp, ri->ri_stride, int32_t *);
 
-                       if (lmask)
-                               *dp++ = (*dp & lmask) | lclr;
+                       if (lmask) {
+                               *dp = (*dp & lmask) | lclr;
+                               dp++;
+                       }
 
                        for (cnt = num; cnt > 0; cnt--)
                                *dp++ = clr;



Home | Main Index | Thread Index | Old Index