diff options
author | dillon <dillon@FreeBSD.org> | 2003-01-12 01:37:13 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2003-01-12 01:37:13 +0000 |
commit | ddf9ef103e0a611c9a01425a28baf8a612b0d114 (patch) | |
tree | 19da0d56c468b8e0f6d0361d7d39157f561aa69f /sys/kern/uipc_usrreq.c | |
parent | 07cbccc353d7afbe8948b6025965ca36739d7373 (diff) | |
download | FreeBSD-src-ddf9ef103e0a611c9a01425a28baf8a612b0d114.zip FreeBSD-src-ddf9ef103e0a611c9a01425a28baf8a612b0d114.tar.gz |
Change struct file f_data to un_data, a union of the correct struct
pointer types, and remove a huge number of casts from code using it.
Change struct xfile xf_data to xun_data (ABI is still compatible).
If we need to add a #define for f_data and xf_data we can, but I don't
think it will be necessary. There are no operational changes in this
commit.
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r-- | sys/kern/uipc_usrreq.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 5ca7c39..6846352 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1305,7 +1305,7 @@ unp_gc() * Now check if it is possibly one of OUR sockets. */ if (fp->f_type != DTYPE_SOCKET || - (so = (struct socket *)fp->f_data) == 0) { + (so = fp->un_data.socket) == 0) { FILE_UNLOCK(fp); continue; } @@ -1412,9 +1412,10 @@ unp_gc() for (i = nunref, fpp = extra_ref; --i >= 0; ++fpp) { struct file *tfp = *fpp; FILE_LOCK(tfp); - if (tfp->f_type == DTYPE_SOCKET && tfp->f_data != NULL) { + if (tfp->f_type == DTYPE_SOCKET && + tfp->un_data.socket != NULL) { FILE_UNLOCK(tfp); - sorflush((struct socket *)(tfp->f_data)); + sorflush(tfp->un_data.socket); } else FILE_UNLOCK(tfp); } |