Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcsh/dev pfckbd_input: make edge and mask unsigned...



details:   https://anonhg.NetBSD.org/src/rev/7d958db6d38e
branches:  trunk
changeset: 587377:7d958db6d38e
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sat Jan 21 23:16:57 2006 +0000

description:
pfckbd_input: make edge and mask unsigned ints to avoid lint warning
about obscure semantics change in ANSI C.  Saves one extu.w too.
Move edge assignment out of if conditional expression.

diffstat:

 sys/arch/hpcsh/dev/pfckbd.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 4961070e62b5 -r 7d958db6d38e sys/arch/hpcsh/dev/pfckbd.c
--- a/sys/arch/hpcsh/dev/pfckbd.c       Sat Jan 21 22:55:34 2006 +0000
+++ b/sys/arch/hpcsh/dev/pfckbd.c       Sat Jan 21 23:16:57 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pfckbd.c,v 1.17 2006/01/21 22:55:34 uwe Exp $  */
+/*     $NetBSD: pfckbd.c,v 1.18 2006/01/21 23:16:57 uwe Exp $  */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pfckbd.c,v 1.17 2006/01/21 22:55:34 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pfckbd.c,v 1.18 2006/01/21 23:16:57 uwe Exp $");
 
 #include "debug_hpcsh.h"
 
@@ -192,9 +192,10 @@
     int column)
 {
        int row, type, val;
-       uint16_t edge, mask;
+       unsigned int edge, mask;
 
-       if ((edge = (data ^ buf[column]))) {
+       edge = data ^ buf[column];
+       if (edge) {
                buf[column] = data;
 
                for (row = 0, mask = 1; row < 16; row++, mask <<= 1) {



Home | Main Index | Thread Index | Old Index