summaryrefslogtreecommitdiff
path: root/sys/compat/ossaudio/ossaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/ossaudio/ossaudio.c')
-rw-r--r--sys/compat/ossaudio/ossaudio.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/compat/ossaudio/ossaudio.c b/sys/compat/ossaudio/ossaudio.c
index e61c0fd58eb..8795d62e039 100644
--- a/sys/compat/ossaudio/ossaudio.c
+++ b/sys/compat/ossaudio/ossaudio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ossaudio.c,v 1.5 2001/05/24 04:21:02 aaron Exp $ */
+/* $OpenBSD: ossaudio.c,v 1.6 2001/10/26 12:03:27 art Exp $ */
/* $NetBSD: ossaudio.c,v 1.23 1997/10/19 07:41:52 augustss Exp $ */
/*
@@ -88,8 +88,7 @@ oss_ioctl_audio(p, uap, retval)
int (*ioctlf) __P((struct file *, u_long, caddr_t, struct proc *));
fdp = p->p_fd;
- if ((u_int)SCARG(uap, fd) >= fdp->fd_nfiles ||
- (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL)
+ if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
return (EBADF);
if ((fp->f_flag & (FREAD | FWRITE)) == 0)
@@ -652,8 +651,7 @@ oss_ioctl_mixer(p, uap, retval)
int (*ioctlf) __P((struct file *, u_long, caddr_t, struct proc *));
fdp = p->p_fd;
- if ((u_int)SCARG(uap, fd) >= fdp->fd_nfiles ||
- (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL)
+ if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
return (EBADF);
if ((fp->f_flag & (FREAD | FWRITE)) == 0)
@@ -816,8 +814,7 @@ oss_ioctl_sequencer(p, uap, retval)
#endif
fdp = p->p_fd;
- if ((u_int)SCARG(uap, fd) >= fdp->fd_nfiles ||
- (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL)
+ if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
return (EBADF);
if ((fp->f_flag & (FREAD | FWRITE)) == 0)