]> git.baikalelectronics.ru Git - kernel.git/commit
fs/proc/vmcore.c: put if tests in the top of the while loop to reduce duplication
authorZhang Yanfei <zhangyanfei@cn.fujitsu.com>
Thu, 28 Feb 2013 01:03:17 +0000 (17:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Feb 2013 03:10:11 +0000 (19:10 -0800)
commitc220e12ae37ec5df2c725d3dbb6cf5b5c9925e9e
tree222677ea402d630ca50416dc76f9ae187d7f7acc
parent84b686cf8e9bea4b7352ee771b6da1c094fb8b49
fs/proc/vmcore.c: put if tests in the top of the while loop to reduce duplication

In read_vmcore() two `if' tests are duplicated.  Change the position of
them could reduce the duplication.  This change does not affect the
behaviour of the function.

[akpm@linux-foundation.org: avoid `if (foo = bar)' thing, use min_t()]
[akpm@linux-foundation.org: s/max_t/min_t/]
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/vmcore.c