From: zhong jiang <zhongjiang@huawei.com>
To: <viro@zeniv.linux.org.uk>
Cc: <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] fs/binfmt_elf_fdpic: remove redundant condition check in writenote
Date: Thu, 2 Aug 2018 10:04:34 +0800 [thread overview]
Message-ID: <1533175474-17785-1-git-send-email-zhongjiang@huawei.com> (raw)
It is unncessary to use double test for a expression. so just
remove one of them.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
fs/binfmt_elf_fdpic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index b53bb37..5162372 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -1288,7 +1288,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 inline void fill_elf_fdpic_header(struct elfhdr *elf, int segs)
--
1.7.12.4
next reply other threads:[~2018-08-02 4:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-02 2:04 zhong jiang [this message]
2018-08-02 2:51 ` [PATCH] fs/binfmt_elf_fdpic: remove redundant condition check in writenote zhong jiang
2018-08-02 3:05 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1533175474-17785-1-git-send-email-zhongjiang@huawei.com \
--to=zhongjiang@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).