This patch fixes error style problems found by checkpatch.pl: ERROR: suspect code indent for conditional statements
Signed-off-by: Liyang Shi <shiliy...@huawei.com> --- bsd-user/elfload.c | 2 +- bsd-user/mmap.c | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c index 4d1a572534..d5cab25607 100644 --- a/bsd-user/elfload.c +++ b/bsd-user/elfload.c @@ -765,7 +765,7 @@ int load_elf_binary(struct bsd_binprm *bprm, struct target_pt_regs *regs, /* Now figure out which format our binary is */ if ((N_MAGIC(interp_ex) != OMAGIC) && (N_MAGIC(interp_ex) != ZMAGIC) && (N_MAGIC(interp_ex) != QMAGIC)) { - interpreter_type = INTERPRETER_ELF; + interpreter_type = INTERPRETER_ELF; } if (interp_elf_ex.e_ident[0] != 0x7f || diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index 1b8c8382ca..785655f319 100644 --- a/bsd-user/mmap.c +++ b/bsd-user/mmap.c @@ -487,18 +487,19 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, up to the targets page boundary. */ if ((qemu_real_host_page_size < qemu_host_page_size) && fd != -1) { - struct stat sb; - - if (fstat (fd, &sb) == -1) - goto fail; - - /* Are we trying to create a map beyond EOF?. */ - if (offset + len > sb.st_size) { - /* If so, truncate the file map at eof aligned with - the hosts real pagesize. Additional anonymous maps - will be created beyond EOF. */ - len = REAL_HOST_PAGE_ALIGN(sb.st_size - offset); - } + struct stat sb; + + if (fstat(fd, &sb) == -1) { + goto fail; + } + + /* Are we trying to create a map beyond EOF?. */ + if (offset + len > sb.st_size) { + /* If so, truncate the file map at eof aligned with + the hosts real pagesize. Additional anonymous maps + will be created beyond EOF. */ + len = REAL_HOST_PAGE_ALIGN(sb.st_size - offset); + } } if (!(flags & MAP_FIXED)) { -- 2.29.1.59.gf9b6481aed