diff options
author | kib <kib@FreeBSD.org> | 2009-05-24 12:28:38 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2009-05-24 12:28:38 +0000 |
commit | 56e5e587c8e87d5cb9fa566398a3676b36703171 (patch) | |
tree | a0b918f89c4e548b53d551ed33839c355034cbd4 | |
parent | 216f2b3fe33d137b88c8923ae63a501cc26e6d0b (diff) | |
download | FreeBSD-src-56e5e587c8e87d5cb9fa566398a3676b36703171.zip FreeBSD-src-56e5e587c8e87d5cb9fa566398a3676b36703171.tar.gz |
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
-rw-r--r-- | sys/kern/kern_lockf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c index b8cece6..aeb6a8c 100644 --- a/sys/kern/kern_lockf.c +++ b/sys/kern/kern_lockf.c @@ -1361,7 +1361,7 @@ lf_setlock(struct lockf *state, struct lockf_entry *lock, struct vnode *vp, /* * 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. */ |