svn commit: r192681 - head/sys/kern

Konstantin Belousov kib at FreeBSD.org
Sun May 24 12:28:39 UTC 2009


Author: kib
Date: Sun May 24 12:28:38 2009
New Revision: 192681
URL: http://svn.freebsd.org/changeset/base/192681

Log:
  Replace the while statement with the if for clarity. The loop body
  cannot be executed more then once.
  
  Reviewed by:	dfr
  Tested by:	pho
  MFC after:	1 month

Modified:
  head/sys/kern/kern_lockf.c

Modified: head/sys/kern/kern_lockf.c
==============================================================================
--- head/sys/kern/kern_lockf.c	Sun May 24 11:52:08 2009	(r192680)
+++ head/sys/kern/kern_lockf.c	Sun May 24 12:28:38 2009	(r192681)
@@ -1361,7 +1361,7 @@ lf_setlock(struct lockf *state, struct l
 	/*
 	 * Scan lock list for this file looking for locks that would block us.
 	 */
-	while (lf_getblock(state, lock)) {
+	if (lf_getblock(state, lock)) {
 		/*
 		 * Free the structure and return if nonblocking.
 		 */


More information about the svn-src-all mailing list