Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/bluetooth #ifdef the "npress" variable, so it is onl...
details: https://anonhg.NetBSD.org/src/rev/cee9971b04ec
branches: trunk
changeset: 789885:cee9971b04ec
user: martin <martin%NetBSD.org@localhost>
date: Thu Sep 12 12:20:01 2013 +0000
description:
#ifdef the "npress" variable, so it is only defined (and initialized) when
it is also used.
diffstat:
sys/dev/bluetooth/btkbd.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 8318bb7bb718 -r cee9971b04ec sys/dev/bluetooth/btkbd.c
--- a/sys/dev/bluetooth/btkbd.c Thu Sep 12 12:10:11 2013 +0000
+++ b/sys/dev/bluetooth/btkbd.c Thu Sep 12 12:20:01 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: btkbd.c,v 1.15 2012/10/27 17:18:15 chs Exp $ */
+/* $NetBSD: btkbd.c,v 1.16 2013/09/12 12:20:01 martin Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btkbd.c,v 1.15 2012/10/27 17:18:15 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btkbd.c,v 1.16 2013/09/12 12:20:01 martin Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@@ -541,9 +541,11 @@
if (sc->sc_rawkbd) {
u_char cbuf[MAXKEYS * 2];
int c;
- int npress;
+#ifdef BTKBD_REPEAT
+ int npress = 0;
+#endif
- for (npress = i = j = 0 ; i < nkeys ; i++) {
+ for (i = j = 0 ; i < nkeys ; i++) {
key = ibuf[i];
c = btkbd_trtab[key & CODEMASK];
if (c == NN)
Home |
Main Index |
Thread Index |
Old Index