Date: Tue, 23 Jun 2009 10:41:38 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r194692 - in stable/7/sys: . contrib/pf kern Message-ID: <200906231041.n5NAfcYn073481@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue Jun 23 10:41:38 2009 New Revision: 194692 URL: http://svn.freebsd.org/changeset/base/194692 Log: MFC r192681: Replace the while statement with the if for clarity. The loop body cannot be executed more then once. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/kern_lockf.c Modified: stable/7/sys/kern/kern_lockf.c ============================================================================== --- stable/7/sys/kern/kern_lockf.c Tue Jun 23 10:37:28 2009 (r194691) +++ stable/7/sys/kern/kern_lockf.c Tue Jun 23 10:41:38 2009 (r194692) @@ -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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906231041.n5NAfcYn073481>