summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2005-02-24 22:17:57 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-02-24 22:17:57 -0800
commitd6d29b7df443ac7057992ecb3aca88cba17431bb (patch)
tree9884296411e30a31c0b53d7cae548a17a8584ec3
parent10d25b7654108f98c9b0cd69562903701d26410b (diff)
[PATCH] binfmt_elf build fix
The cast to void still triggers the gcc "warning: ignoring return value" warning, which is dumb of it. So ignore the return value differently. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/binfmt_elf.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 1ba738d61470..3be133aa4a79 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -803,13 +803,14 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
nbyte = ELF_MIN_ALIGN - nbyte;
if (nbyte > elf_brk - elf_bss)
nbyte = elf_brk - elf_bss;
- /*
- * This bss-zeroing can fail if the ELF file
- * specifies odd protections. So we don't check
- * the return value
- */
- (void)clear_user((void __user *)elf_bss +
- load_bias, nbyte);
+ if (clear_user((void __user *)elf_bss +
+ load_bias, nbyte)) {
+ /*
+ * This bss-zeroing can fail if the ELF
+ * file specifies odd protections. So
+ * we don't check the return value
+ */
+ }
}
}