diff options
author | 2013-04-05 08:25:30 +0000 | |
---|---|---|
committer | 2013-04-05 08:25:30 +0000 | |
commit | 593ef0897591769d18426f57da95e9a2b61d3023 (patch) | |
tree | 17d18ba638b0caffb41ee6d54fa1401627822f56 /sys/kern/sys_socket.c | |
parent | unfinished opti device code is never called or used (diff) | |
download | wireguard-openbsd-593ef0897591769d18426f57da95e9a2b61d3023.tar.xz wireguard-openbsd-593ef0897591769d18426f57da95e9a2b61d3023.zip |
remove some obsolete casts
Diffstat (limited to 'sys/kern/sys_socket.c')
-rw-r--r-- | sys/kern/sys_socket.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 5d28d6da66d..9958e1f50cd 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_socket.c,v 1.15 2013/01/15 11:12:57 bluhm Exp $ */ +/* $OpenBSD: sys_socket.c,v 1.16 2013/04/05 08:25:30 tedu Exp $ */ /* $NetBSD: sys_socket.c,v 1.13 1995/08/12 23:59:09 mycroft Exp $ */ /* @@ -131,7 +131,7 @@ soo_ioctl(struct file *fp, u_long cmd, caddr_t data, struct proc *p) int soo_poll(struct file *fp, int events, struct proc *p) { - struct socket *so = (struct socket *)fp->f_data; + struct socket *so = fp->f_data; int revents = 0; int s = splsoftnet(); @@ -164,9 +164,9 @@ soo_poll(struct file *fp, int events, struct proc *p) int soo_stat(struct file *fp, struct stat *ub, struct proc *p) { - struct socket *so = (struct socket *)fp->f_data; + struct socket *so = fp->f_data; - bzero((caddr_t)ub, sizeof (*ub)); + bzero(ub, sizeof (*ub)); ub->st_mode = S_IFSOCK; if ((so->so_state & SS_CANTRCVMORE) == 0 || so->so_rcv.sb_cc != 0) @@ -176,8 +176,7 @@ soo_stat(struct file *fp, struct stat *ub, struct proc *p) ub->st_uid = so->so_euid; ub->st_gid = so->so_egid; (void) ((*so->so_proto->pr_usrreq)(so, PRU_SENSE, - (struct mbuf *)ub, (struct mbuf *)0, - (struct mbuf *)0, p)); + (struct mbuf *)ub, NULL, NULL, p)); return (0); } @@ -188,7 +187,7 @@ soo_close(struct file *fp, struct proc *p) int error = 0; if (fp->f_data) - error = soclose((struct socket *)fp->f_data); + error = soclose(fp->f_data); fp->f_data = 0; return (error); } |