diff options
author | alfred <alfred@FreeBSD.org> | 2000-06-12 18:06:12 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2000-06-12 18:06:12 +0000 |
commit | e7947cbed1b066a08b637ca36044e167837192b2 (patch) | |
tree | 523fd8746df1fd353eb3cb39b7cd644d826fc0c3 /sys/kern/uipc_syscalls.c | |
parent | 6c90966cad8960204e970e220ce11ccd81994f46 (diff) | |
download | FreeBSD-src-e7947cbed1b066a08b637ca36044e167837192b2.zip FreeBSD-src-e7947cbed1b066a08b637ca36044e167837192b2.tar.gz |
unstatic getfp() so that other subsystems can use it.
make sendfile() use it.
Approved by: dg
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r-- | sys/kern/uipc_syscalls.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 298bbe1..480b8dc 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1432,9 +1432,8 @@ sendfile(struct proc *p, struct sendfile_args *uap) * Do argument checking. Must be a regular file in, stream * type and connected socket out, positive offset. */ - if (((u_int)uap->fd) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[uap->fd]) == NULL || - (fp->f_flag & FREAD) == 0) { + fp = getfp(fdp, uap->fd, FREAD); + if (fp == NULL) { error = EBADF; goto done; } |