The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=20ac5cda965eccc34f975674c6efc97c3615a234
commit 20ac5cda965eccc34f975674c6efc97c3615a234 Author: Mateusz Guzik <m...@freebsd.org> AuthorDate: 2020-12-23 13:50:34 +0000 Commit: Mateusz Guzik <m...@freebsd.org> CommitDate: 2021-01-07 23:30:04 +0000 fd: make fd/fp mandatory They are both always passed anyway. --- sys/kern/kern_descrip.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index ff11ae4f1a61..e1ffdc3baf01 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1976,6 +1976,9 @@ falloc_caps(struct thread *td, struct file **resultfp, int *resultfd, int flags, struct file *fp; int error, fd; + MPASS(resultfp != NULL); + MPASS(resultfd != NULL); + error = falloc_noinstall(td, &fp); if (error) return (error); /* no reference held on error */ @@ -1986,13 +1989,8 @@ falloc_caps(struct thread *td, struct file **resultfp, int *resultfd, int flags, return (error); } - if (resultfp != NULL) - *resultfp = fp; /* copy out result */ - else - fdrop(fp, td); /* release local reference */ - - if (resultfd != NULL) - *resultfd = fd; + *resultfp = fp; + *resultfd = fd; return (0); } _______________________________________________ dev-commits-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"