diff options
author | Andre Noll <maan@systemlinux.org> | 2008-07-11 22:02:20 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-07-11 22:02:20 +1000 |
commit | ce0c8e05f8ef93d991d665aade8c4bf35806ea1a (patch) | |
tree | e3fb5bb279452161aca0351993f76b98ffbbb662 /drivers | |
parent | 05710466c9ef2e3ee55166934c801a2393c32f80 (diff) | |
download | linux-stable-ce0c8e05f8ef93d991d665aade8c4bf35806ea1a.tar.gz linux-stable-ce0c8e05f8ef93d991d665aade8c4bf35806ea1a.tar.bz2 linux-stable-ce0c8e05f8ef93d991d665aade8c4bf35806ea1a.zip |
md: Simplify sb_equal().
The only caller of sb_equal() tests the return value against
zero, so it's OK to return the negated return value of memcmp().
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/md.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 8a03c953b887..20e03db8fdfc 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -572,11 +572,7 @@ static int sb_equal(mdp_super_t *sb1, mdp_super_t *sb2) tmp1->nr_disks = 0; tmp2->nr_disks = 0; - if (memcmp(tmp1, tmp2, MD_SB_GENERIC_CONSTANT_WORDS * 4)) - ret = 0; - else - ret = 1; - + ret = (memcmp(tmp1, tmp2, MD_SB_GENERIC_CONSTANT_WORDS * 4) == 0); abort: kfree(tmp1); kfree(tmp2); |