tools/ocaml/xc: Fix code legibility in stub_xc_domain_create()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 12 Oct 2022 10:02:08 +0000 (11:02 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 13 Oct 2022 10:41:48 +0000 (11:41 +0100)
Reposition the defines to match the outer style and to make the logic
half-legible.

No functional change.

Fixes: 0570d7f276dd ("x86/msr: introduce an option for compatible MSR behavior selection")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
tools/ocaml/libs/xc/xenctrl_stubs.c

index 19335bdf457288dcf765063bf5084186cbaa16a1..fe9c00ce008aa4934e86b4c7b9427dced7fc7d43 100644 (file)
@@ -232,22 +232,20 @@ CAMLprim value stub_xc_domain_create(value xch, value wanted_domid, value config
 
         /* Mnemonics for the named fields inside xen_x86_arch_domainconfig */
 #define VAL_EMUL_FLAGS          Field(arch_domconfig, 0)
+#define VAL_MISC_FLAGS          Field(arch_domconfig, 1)
 
                cfg.arch.emulation_flags = ocaml_list_to_c_bitmap
                        /* ! x86_arch_emulation_flags X86_EMU_ none */
                        /* ! XEN_X86_EMU_ XEN_X86_EMU_ALL all */
                        (VAL_EMUL_FLAGS);
 
-#undef VAL_EMUL_FLAGS
-
-#define VAL_MISC_FLAGS          Field(arch_domconfig, 1)
-
                cfg.arch.misc_flags = ocaml_list_to_c_bitmap
                        /* ! x86_arch_misc_flags X86_ none */
                        /* ! XEN_X86_ XEN_X86_MISC_FLAGS_MAX max */
                        (VAL_MISC_FLAGS);
 
 #undef VAL_MISC_FLAGS
+#undef VAL_EMUL_FLAGS
 
 #else
                caml_failwith("Unhandled: x86");