summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/io/vuidmice/vuidm4p.c
diff options
context:
space:
mode:
authorgd78059 <none@none>2008-07-01 11:22:16 -0700
committergd78059 <none@none>2008-07-01 11:22:16 -0700
commit22eb7cb54d8a6bcf6fe2674cb4b1f0cf2d85cfb6 (patch)
tree566d50817562c3269e1facc0905dcf7adf562774 /usr/src/uts/common/io/vuidmice/vuidm4p.c
parent7f7c96a6a7060c462769ffdab973f2d77a5845b5 (diff)
downloadillumos-gate-22eb7cb54d8a6bcf6fe2674cb4b1f0cf2d85cfb6.tar.gz
6692913 MBLKL generates E_PTRDIFF_OVERFLOW lint warnings
6717598 MBLKSIZE() causes lint pointer-difference warnings
Diffstat (limited to 'usr/src/uts/common/io/vuidmice/vuidm4p.c')
-rw-r--r--usr/src/uts/common/io/vuidmice/vuidm4p.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr/src/uts/common/io/vuidmice/vuidm4p.c b/usr/src/uts/common/io/vuidmice/vuidm4p.c
index bb451b0508..9af020b4af 100644
--- a/usr/src/uts/common/io/vuidmice/vuidm4p.c
+++ b/usr/src/uts/common/io/vuidmice/vuidm4p.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -32,6 +31,7 @@
#include <sys/param.h>
#include <sys/stream.h>
+#include <sys/strsun.h>
#include <sys/vuid_event.h>
#include <sys/vuidmice.h>
@@ -99,7 +99,7 @@ vuidm4p(queue_t *const qp, mblk_t *mp)
unsigned char *bufp;
bufp = mp->b_rptr;
- r = mp->b_wptr - mp->b_rptr;
+ r = MBLKL(mp);
for (r--; r >= 0; r--) {
code = *bufp++;
@@ -134,7 +134,7 @@ vuidm4p(queue_t *const qp, mblk_t *mp)
/* Get the new state for the LEFT & RIGHT Button */
STATEP->buttons |=
- (code & (MOUSE_BUTTON_L | MOUSE_BUTTON_R));
+ (code & (MOUSE_BUTTON_L | MOUSE_BUTTON_R));
/*
* bits 0 & 1 are bits 6 & 7 of X value
@@ -170,7 +170,7 @@ vuidm4p(queue_t *const qp, mblk_t *mp)
STATEP->state = MOUSE_DELTA_Y;
STATEP->buttons |=
- (STATEP->oldbuttons & MOUSE_BUTTON_M);
+ (STATEP->oldbuttons & MOUSE_BUTTON_M);
/*
* If we can peek at the next two mouse characters,