| 300 | } |
| 301 | |
| 302 | static __inline struct filedescent * |
| 303 | fdeget_locked(struct filedesc *fdp, int fd) |
| 304 | { |
| 305 | struct filedescent *fde; |
| 306 | |
| 307 | FILEDESC_LOCK_ASSERT(fdp); |
| 308 | |
| 309 | if (__predict_false((u_int)fd >= fdp->fd_nfiles)) |
| 310 | return (NULL); |
| 311 | |
| 312 | fde = &fdp->fd_ofiles[fd]; |
| 313 | if (__predict_false(fde->fde_file == NULL)) |
| 314 | return (NULL); |
| 315 | |
| 316 | return (fde); |
| 317 | } |
| 318 | |
| 319 | #ifdef CAPABILITIES |
| 320 | static __inline bool |
no outgoing calls
no test coverage detected