summaryrefslogtreecommitdiff
path: root/sys/kern/kern_descrip.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-10-07 23:12:07 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-10-07 23:12:07 +0000
commit25482fe0e272ed5d4e37d0b59e428b4a3decbaf9 (patch)
treee524456c9627953722415296d1f4c26200f93ec0 /sys/kern/kern_descrip.c
parentc8f4242d58aec2b46469a58c7773d387977b4c73 (diff)
Clean up fdrelease.
Diffstat (limited to 'sys/kern/kern_descrip.c')
-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);