Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/rasops Remove duplicate substitution. Style. No func...



details:   https://anonhg.NetBSD.org/src/rev/9b3b91daa501
branches:  trunk
changeset: 964449:9b3b91daa501
user:      rin <rin%NetBSD.org@localhost>
date:      Fri Aug 02 04:26:44 2019 +0000

description:
Remove duplicate substitution. Style. No functional changes.

diffstat:

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

diffs (51 lines):

diff -r ce238473a0da -r 9b3b91daa501 sys/dev/rasops/rasops_bitops.h
--- a/sys/dev/rasops/rasops_bitops.h    Fri Aug 02 04:23:20 2019 +0000
+++ b/sys/dev/rasops/rasops_bitops.h    Fri Aug 02 04:26:44 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rasops_bitops.h,v 1.19 2019/08/01 03:43:54 rin Exp $   */
+/*     $NetBSD: rasops_bitops.h,v 1.20 2019/08/02 04:26:44 rin Exp $   */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -45,7 +45,6 @@
 
        hp = NULL;      /* XXX GCC */
 
-
 #ifdef RASOPS_CLIPPING
        if ((unsigned)row >= (unsigned)ri->ri_rows)
                return;
@@ -61,6 +60,7 @@
        if (num <= 0)
                return;
 #endif
+
        col *= ri->ri_font->fontwidth << PIXEL_SHIFT;
        num *= ri->ri_font->fontwidth << PIXEL_SHIFT;
        height = ri->ri_font->fontheight;
@@ -186,6 +186,7 @@
                                    (rmask != -1)) << 2);
                                DELTA(hp, ri->ri_stride, uint32_t *);
                        }
+
                        DELTA(rp, ri->ri_stride, uint32_t *);
                }
        }
@@ -336,7 +337,6 @@
                if (ri->ri_hwbits)
                        dhp = (uint32_t *)(ri->ri_hwbits + row +
                            ((dst >> 3) & ~3));
-               db = dst & 31;
 
                while (height--) {
                        sb = src & 31;
@@ -348,7 +348,8 @@
                                PUTBITS(tmp, db, lnum, dp);
                                dp++;
 
-                               if (sb += lnum > 31) {
+                               sb += lnum;
+                               if (sb > 31) {
                                        sp++;
                                        sb -= 32;
                                }



Home | Main Index | Thread Index | Old Index