summaryrefslogtreecommitdiff
path: root/usr.sbin/wsmoused
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-30 19:09:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-30 19:09:07 +0000
commit22faa0a671e92f0076f8972f1f7aa74766d489a5 (patch)
tree97a8c7121964d389a3cbd917096e456c04c013c1 /usr.sbin/wsmoused
parentd1745b0530a8fcf3ec033c201f02d150ce37d224 (diff)
minor KNF
Diffstat (limited to 'usr.sbin/wsmoused')
-rw-r--r--usr.sbin/wsmoused/wsmoused.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/wsmoused/wsmoused.c b/usr.sbin/wsmoused/wsmoused.c
index db252ea5639..bb9ee107253 100644
--- a/usr.sbin/wsmoused/wsmoused.c
+++ b/usr.sbin/wsmoused/wsmoused.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsmoused.c,v 1.12 2002/05/26 09:32:44 deraadt Exp $ */
+/* $OpenBSD: wsmoused.c,v 1.13 2002/05/30 19:09:05 deraadt Exp $ */
/*
* Copyright (c) 2001 Jean-Baptiste Marchand, Julien Montagne and Jerome Verdon
@@ -329,7 +329,7 @@ treat_event(struct wscons_event *event)
mouse_click(&mapped_event);
return 1;
}
- if (event->type == WSCONS_EVENT_WSMOUSED_CLOSE)
+ if (event->type == WSCONS_EVENT_WSMOUSED_CLOSE)
/* we have to close mouse fd */
return 0;
return 1;
@@ -414,9 +414,9 @@ wsmoused(void)
/* get major and minor of mouse device */
res = stat(mouse.portname, &mdev_stat);
- if (res != -1)
+ if (res != -1)
event.value = mdev_stat.st_rdev;
- else
+ else
event.value = 0;
}
else
@@ -446,7 +446,7 @@ wsmoused(void)
read(mouse.mfd, &event, sizeof(event));
res = treat_event(&event);
if (!res) {
- /* close mouse device and sleep until
+ /* close mouse device and sleep until
the X server release it */
struct wscons_event sleeping;
@@ -457,19 +457,19 @@ wsmoused(void)
close(mouse.mfd);
mouse.mfd = -1;
-
+
/* sleep until X server releases mouse device */
sleeping.type = WSCONS_EVENT_WSMOUSED_SLEEP;
sleeping.value = 0;
- ioctl(mouse.cfd, WSDISPLAYIO_WSMOUSED,
+ ioctl(mouse.cfd, WSDISPLAYIO_WSMOUSED,
&sleeping);
/* waiting for availability of mouse device */
sleep(1);
- if ((mouse.mfd = open(mouse.portname,
- O_RDONLY | O_NONBLOCK, 0)) == -1)
- logerr(1, "unable to open %s",
+ if ((mouse.mfd = open(mouse.portname,
+ O_RDONLY | O_NONBLOCK, 0)) == -1)
+ logerr(1, "unable to open %s",
mouse.portname);
mouse_init();
}