qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/6] hw/loader: Clarify local variable name in load_elf_ram_sym()


From: Philippe Mathieu-Daudé
Subject: [PATCH 3/6] hw/loader: Clarify local variable name in load_elf_ram_sym()
Date: Mon, 27 Jan 2025 12:38:21 +0100

load_elf_ram_sym() compares target_data_order versus
host data_order. Rename 'data_order' -> 'host_data_order'
to ease code review.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/core/loader.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/core/loader.c b/hw/core/loader.c
index ead10fb6cb5..fc2e8f91267 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -443,7 +443,7 @@ ssize_t load_elf_ram_sym(const char *filename,
                          int clear_lsb, int data_swab,
                          AddressSpace *as, bool load_rom, symbol_fn_t sym_cb)
 {
-    int fd, data_order, target_data_order, must_swab;
+    int fd, host_data_order, target_data_order, must_swab;
     ssize_t ret = ELF_LOAD_FAILED;
     uint8_t e_ident[EI_NIDENT];
 
@@ -462,11 +462,11 @@ ssize_t load_elf_ram_sym(const char *filename,
         goto fail;
     }
 #if HOST_BIG_ENDIAN
-    data_order = ELFDATA2MSB;
+    host_data_order = ELFDATA2MSB;
 #else
-    data_order = ELFDATA2LSB;
+    host_data_order = ELFDATA2LSB;
 #endif
-    must_swab = data_order != e_ident[EI_DATA];
+    must_swab = host_data_order != e_ident[EI_DATA];
     if (big_endian) {
         target_data_order = ELFDATA2MSB;
     } else {
-- 
2.47.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]