Skip to contentSkip to conversation

m68k: use correct variable name in boot info string macro

PATCH In review Jason A. Donenfeld 2 participants 2 messages Jun 25, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k: use correct variable name in boot info string macro

Every time this macro is used, the caller is passing in "parameters_base", so this bug wasn't spotted. But the actual macro variable name is "base", so use that instead.

---
 hw/m68k/bootinfo.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/m68k/bootinfo.h +1 -1
index adbf0c5521..ff4e155a3c 100644
@@ -54,6 +54,6 @@
             stb_phys(as, base++, string[i]); \
         } \
         stb_phys(as, base++, 0); \
-        base = (parameters_base + 1) & ~1; \
+        base = (base + 1) & ~1; \
     } while (0)
 #endif
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw

Le 25/06/2022 à 17:23, Jason A. Donenfeld a écrit :

Quoted 14 lines

Every time this macro is used, the caller is passing in "parameters_base", so this bug wasn't spotted. But the actual macro variable name is "base", so use that instead.

---
  hw/m68k/bootinfo.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/m68k/bootinfo.h +0 -0
index adbf0c5521..ff4e155a3c 100644

hw/m68k/bootinfo.h line 59

Quoted 7 lines
hw/m68k/bootinfo.h +1 -1
@@ -54,6 +54,6 @@
              stb_phys(as, base++, string[i]); \
          } \
          stb_phys(as, base++, 0); \
-        base = (parameters_base + 1) & ~1; \
+        base = (base + 1) & ~1; \
      } while (0)
  #endif