Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpuffs remove now unnecessary casts.
details: https://anonhg.NetBSD.org/src/rev/5659145c836a
branches: trunk
changeset: 354385:5659145c836a
user: christos <christos%NetBSD.org@localhost>
date: Wed Jun 14 16:39:41 2017 +0000
description:
remove now unnecessary casts.
diffstat:
lib/libpuffs/framebuf.c | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 deletions(-)
diffs (78 lines):
diff -r 8bf96c894c26 -r 5659145c836a lib/libpuffs/framebuf.c
--- a/lib/libpuffs/framebuf.c Wed Jun 14 16:37:05 2017 +0000
+++ b/lib/libpuffs/framebuf.c Wed Jun 14 16:39:41 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: framebuf.c,v 1.34 2017/05/31 17:56:00 christos Exp $ */
+/* $NetBSD: framebuf.c,v 1.35 2017/06/14 16:39:41 christos Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: framebuf.c,v 1.34 2017/05/31 17:56:00 christos Exp $");
+__RCSID("$NetBSD: framebuf.c,v 1.35 2017/06/14 16:39:41 christos Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -558,8 +558,7 @@
if (*what & PUFFS_FBIO_READ)
if ((fio->stat & FIO_ENABLE_R) == 0)
- EV_SET(&kev, fd, EVFILT_READ, EV_ENABLE,
- 0, 0, (intptr_t)fio);
+ EV_SET(&kev, fd, EVFILT_READ, EV_ENABLE, 0, 0, fio);
if (kevent(pu->pu_kq, &kev, 1, NULL, 0, NULL) == -1)
return -1;
@@ -577,8 +576,7 @@
if (*what & PUFFS_FBIO_READ) {
fio->rwait--;
if (fio->rwait == 0 && (fio->stat & FIO_ENABLE_R) == 0) {
- EV_SET(&kev, fd, EVFILT_READ, EV_DISABLE,
- 0, 0, (intptr_t)fio);
+ EV_SET(&kev, fd, EVFILT_READ, EV_DISABLE, 0, 0, fio);
rv = kevent(pu->pu_kq, &kev, 1, NULL, 0, NULL);
#if 0
if (rv != 0)
@@ -812,12 +810,11 @@
if (fstat(fd, &st) == -1)
goto out;
- EV_SET(&kev[nf], fd, EVFILT_READ,
- EV_ADD|readenable, 0, 0, (intptr_t)fio);
+ EV_SET(&kev[nf], fd, EVFILT_READ, EV_ADD|readenable, 0, 0, fio);
nf++;
if (S_ISSOCK(st.st_mode)) {
EV_SET(&kev[nf], fd, EVFILT_WRITE,
- EV_ADD|EV_DISABLE, 0, 0, (intptr_t)fio);
+ EV_ADD|EV_DISABLE, 0, 0, fio);
nf++;
}
rv = kevent(pu->pu_kq, kev, nf, NULL, 0, NULL);
@@ -869,7 +866,7 @@
/* write is enabled in the event loop if there is output */
if (what & PUFFS_FBIO_READ && fio->rwait == 0) {
- EV_SET(&kev, fd, EVFILT_READ, EV_ENABLE, 0, 0, (intptr_t)fio);
+ EV_SET(&kev, fd, EVFILT_READ, EV_ENABLE, 0, 0, fio);
rv = kevent(pu->pu_kq, &kev, 1, NULL, 0, NULL);
}
@@ -901,13 +898,11 @@
i = 0;
if (what & PUFFS_FBIO_READ && fio->rwait == 0) {
- EV_SET(&kev[0], fd,
- EVFILT_READ, EV_DISABLE, 0, 0, (intptr_t)fio);
+ EV_SET(&kev[0], fd, EVFILT_READ, EV_DISABLE, 0, 0, fio);
i++;
}
if (what & PUFFS_FBIO_WRITE && fio->stat & FIO_WR && fio->wwait == 0) {
- EV_SET(&kev[1], fd,
- EVFILT_WRITE, EV_DISABLE, 0, 0, (intptr_t)fio);
+ EV_SET(&kev[1], fd, EVFILT_WRITE, EV_DISABLE, 0, 0, fio);
i++;
}
if (i)
Home |
Main Index |
Thread Index |
Old Index