Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jun 2012 13:10:21 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r236849 - head/sys/kern
Message-ID:  <201206101310.q5ADAL2p098725@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206101310.q5ADAL2p098725>