summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorart <art@openbsd.org>2001-10-07 23:12:06 +0000
committerart <art@openbsd.org>2001-10-07 23:12:06 +0000
commit4d1ac750ea62cef8ec6129bb06ba3e85aff8632c (patch)
tree87e22058475af2198b871527f17e2f8288c5ac33
parentgc UF_MAPPED. (diff)
downloadwireguard-openbsd-4d1ac750ea62cef8ec6129bb06ba3e85aff8632c.tar.xz
wireguard-openbsd-4d1ac750ea62cef8ec6129bb06ba3e85aff8632c.zip
Clean up fdrelease.
-rw-r--r--sys/kern/kern_descrip.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index c0c3aa26f26..571e24a4946 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_descrip.c,v 1.37 2001/10/07 22:42:07 art Exp $ */
+/* $OpenBSD: kern_descrip.c,v 1.38 2001/10/07 23:12:06 art Exp $ */
/* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */
/*
@@ -460,17 +460,15 @@ fdrelease(p, fd)
struct proc *p;
int fd;
{
- register struct filedesc *fdp = p->p_fd;
- register struct file **fpp, *fp;
- register char *pf;
+ struct filedesc *fdp = p->p_fd;
+ struct file **fpp, *fp;
fpp = &fdp->fd_ofiles[fd];
fp = *fpp;
if (fp == NULL)
return (EBADF);
- pf = &fdp->fd_ofileflags[fd];
*fpp = NULL;
- *pf = 0;
+ fdp->fd_ofileflags[fd] = 0;
fd_unused(fdp, fd);
if (fd < fdp->fd_knlistsize)
knote_fdclose(p, fd);