Module Name:    src
Committed By:   christos
Date:           Wed Jun 14 16:39:41 UTC 2017

Modified Files:
        src/lib/libpuffs: framebuf.c

Log Message:
remove now unnecessary casts.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libpuffs/framebuf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libpuffs/framebuf.c
diff -u src/lib/libpuffs/framebuf.c:1.34 src/lib/libpuffs/framebuf.c:1.35
--- src/lib/libpuffs/framebuf.c:1.34	Wed May 31 13:56:00 2017
+++ src/lib/libpuffs/framebuf.c	Wed Jun 14 12:39:41 2017
@@ -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 @@ puffs_framev_enqueue_waitevent(struct pu
 
 	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 @@ puffs_framev_enqueue_waitevent(struct pu
 	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 @@ puffs__framev_addfd_ctrl(struct puffs_us
 
 		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 @@ puffs_framev_enablefd(struct puffs_userm
 
 	/* 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 @@ puffs_framev_disablefd(struct puffs_user
 
 	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)

Reply via email to