From ac3ae6018409ef410f3e3f0fcd25c372b8055914 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 24 Feb 2022 11:05:38 +0900 Subject: [PATCH] Format --- elf/input-sections.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/elf/input-sections.cc b/elf/input-sections.cc index a8b41a4250..b7c5f243c7 100644 --- a/elf/input-sections.cc +++ b/elf/input-sections.cc @@ -196,11 +196,10 @@ void InputSection::write_to(Context &ctx, u8 *buf) { // Copy data if constexpr (E::e_machine == EM_RISCV) { copy_contents_riscv(ctx, buf); + } else if (is_compressed()) { + uncompress(ctx, buf); } else { - if (is_compressed()) - uncompress(ctx, buf); - else - memcpy(buf, contents.data(), contents.size()); + memcpy(buf, contents.data(), contents.size()); } // Apply relocations