From 25482fe0e272ed5d4e37d0b59e428b4a3decbaf9 Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Sun, 7 Oct 2001 23:12:07 +0000 Subject: Clean up fdrelease. --- sys/kern/kern_descrip.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'sys/kern/kern_descrip.c') 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); -- cgit v1.2.3