Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/rasops Fix another typo which causes decrement again...



details:   https://anonhg.NetBSD.org/src/rev/4d73d273c940
branches:  trunk
changeset: 786923:4d73d273c940
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Tue May 21 15:57:21 2013 +0000

description:
Fix another typo which causes decrement against a NULL pointer.

Also revert rev 1.9, which shut up gcc's "uninitialized variable"
warning that actually pointed out the typo correctly.  Oh well.

diffstat:

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

diffs (27 lines):

diff -r 7082dd4e800c -r 4d73d273c940 sys/dev/rasops/rasops_bitops.h
--- a/sys/dev/rasops/rasops_bitops.h    Tue May 21 15:50:09 2013 +0000
+++ b/sys/dev/rasops/rasops_bitops.h    Tue May 21 15:57:21 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rasops_bitops.h,v 1.13 2013/05/21 15:50:09 tsutsui Exp $       */
+/*     $NetBSD: rasops_bitops.h,v 1.14 2013/05/21 15:57:21 tsutsui Exp $       */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -205,8 +205,6 @@
        int32_t *sp, *dp, *srp, *drp, *dhp = NULL, *hp = NULL;
        struct rasops_info *ri;
 
-       sp = NULL;      /* XXX gcc */
-
        ri = (struct rasops_info *)cookie;
 
 #ifdef RASOPS_CLIPPING
@@ -294,7 +292,7 @@
                db = dst & 31;
 
                if ((src -= db) < 0) {
-                       sp--;
+                       srp--;
                        src += 32;
                }
 



Home | Main Index | Thread Index | Old Index