From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga05-in.huawei.com ([45.249.212.191]:10215 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725785AbeHBFpS (ORCPT ); Thu, 2 Aug 2018 01:45:18 -0400 Message-ID: <5B6280D5.4020705@huawei.com> Date: Thu, 2 Aug 2018 11:56:05 +0800 From: zhong jiang MIME-Version: 1.0 To: Al Viro CC: , Subject: Re: [PATCH] fs/binfmt_elf: remove the same condition check References: <1533175228-17547-1-git-send-email-zhongjiang@huawei.com> <20180802030442.GW30522@ZenIV.linux.org.uk> In-Reply-To: <20180802030442.GW30522@ZenIV.linux.org.uk> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 2018/8/2 11:04, Al Viro wrote: > On Thu, Aug 02, 2018 at 10:00:28AM +0800, zhong jiang wrote: >> dump_align is used to double check in a expression. It is redundant. >> so just remove one of them. > > What makes you think that it is redundant? > I am sorry for that. Maybe I miss something. Thanks zhong jiang >> Signed-off-by: zhong jiang >> --- >> fs/binfmt_elf.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c >> index efae2fb..b6c5b02 100644 >> --- a/fs/binfmt_elf.c >> +++ b/fs/binfmt_elf.c >> @@ -1439,7 +1439,7 @@ static int writenote(struct memelfnote *men, struct coredump_params *cprm) >> >> return dump_emit(cprm, &en, sizeof(en)) && >> dump_emit(cprm, men->name, en.n_namesz) && dump_align(cprm, 4) && >> - dump_emit(cprm, men->data, men->datasz) && dump_align(cprm, 4); >> + dump_emit(cprm, men->data, men->datasz); >> } >> >> static void fill_elf_header(struct elfhdr *elf, int segs, >> -- >> 1.7.12.4 >> > . >