svn commit: r236849 - head/sys/kern
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sun Jun 10 13:10:22 UTC 2012
Author: pjd
Date: Sun Jun 10 13:10:21 2012
New Revision: 236849
URL: http://svn.freebsd.org/changeset/base/236849
Log:
Merge two ifs into one. Other minor style fixes.
MFC after: 1 month
Modified:
head/sys/kern/kern_descrip.c
Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c Sun Jun 10 11:31:50 2012 (r236848)
+++ head/sys/kern/kern_descrip.c Sun Jun 10 13:10:21 2012 (r236849)
@@ -884,8 +884,7 @@ do_dup(struct thread *td, int flags, int
fdrop(fp, td);
return (EBADF);
}
- KASSERT(old != new,
- ("new fd is same as old"));
+ KASSERT(old != new, ("new fd is same as old"));
/*
* Save info on the descriptor being overwritten. We cannot close
@@ -896,19 +895,17 @@ do_dup(struct thread *td, int flags, int
*/
delfp = fdp->fd_ofiles[new];
holdleaders = 0;
- if (delfp != NULL) {
- if (td->td_proc->p_fdtol != NULL) {
- /*
- * Ask fdfree() to sleep to ensure that all relevant
- * process leaders can be traversed in closef().
- */
- fdp->fd_holdleaderscount++;
- holdleaders = 1;
- }
+ if (delfp != NULL && td->td_proc->p_fdtol != NULL) {
+ /*
+ * Ask fdfree() to sleep to ensure that all relevant
+ * process leaders can be traversed in closef().
+ */
+ fdp->fd_holdleaderscount++;
+ holdleaders = 1;
}
/*
- * Duplicate the source descriptor
+ * Duplicate the source descriptor.
*/
fdp->fd_ofiles[new] = fp;
fdp->fd_ofileflags[new] = fdp->fd_ofileflags[old] &~ UF_EXCLOSE;
More information about the svn-src-all
mailing list