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@xxxxxxxxxxxxxxx> --- 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 c559b9e..58762dd 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); abort: kfree(tmp1); kfree(tmp2); -- 1.5.3.8 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html