aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_filedesc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/kern/kern_filedesc.c b/sys/kern/kern_filedesc.c
index ec0aee7..17a3d84 100644
--- a/sys/kern/kern_filedesc.c
+++ b/sys/kern/kern_filedesc.c
@@ -181,13 +181,7 @@ fd_from_fdnum(const struct proc *td, int fdno)
return NULL;
}
- for (size_t i = 0; i < PROC_MAX_FDS; ++i) {
- if (i == fdno && td->fds[i] != NULL) {
- return td->fds[i];
- }
- }
-
- return NULL;
+ return td->fds[fdno];
}
/*