diff options
author | Henric Jungheim <henric@cvs.openbsd.org> | 2003-02-12 20:54:00 +0000 |
---|---|---|
committer | Henric Jungheim <henric@cvs.openbsd.org> | 2003-02-12 20:54:00 +0000 |
commit | 39c9d284d76fdafd073ee8fd79911f9e971451ce (patch) | |
tree | 66f994a8f2bc7541237af6a76cfca281ee99f955 | |
parent | ee0de7c820b23b984936bf4dfbaded2a1ffbfe1c (diff) |
It is not clear that the order of operations will be what the programmer
intended. (This fixes a gcc3 warning.)
ok jason, millert
-rw-r--r-- | sys/dev/rasops/rasops_bitops.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/rasops/rasops_bitops.h b/sys/dev/rasops/rasops_bitops.h index 4b83e862caa..d79b9c6e7ea 100644 --- a/sys/dev/rasops/rasops_bitops.h +++ b/sys/dev/rasops/rasops_bitops.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops_bitops.h,v 1.2 2002/07/27 22:17:49 miod Exp $ */ +/* $OpenBSD: rasops_bitops.h,v 1.3 2003/02/12 20:53:59 henric Exp $ */ /* $NetBSD: rasops_bitops.h,v 1.6 2000/04/12 14:22:30 pk Exp $ */ /*- @@ -103,8 +103,10 @@ NAME(erasecols)(cookie, row, col, num, attr) 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; |