lkml.org 
[lkml]   [2018]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fs/binfmt_elf: remove the same condition check
Date
dump_align is used to double check in a expression. It is redundant.
so just remove one of them.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
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
\
 
 \ /
  Last update: 2018-08-02 04:13    [W:0.065 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site