summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-01-29 00:52:40 +0100
committerRichard Braun <rbraun@sceen.net>2018-01-29 01:12:05 +0100
commitbc6e853d4b27055056eebfd871aaf0fc60405b0f (patch)
tree9860d545d88a627fcea3309efea89cb27779aaf9 /arch
parent3ec2193d8538beec5d961d11d67f568d8d3f6cd8 (diff)
Fix undefined behavior in conditional macro replacement
See C11 6.10.3 ยง11 : If there are sequences of preprocessing tokens within the list of arguments that would otherwise act as preprocessing directives, the behavior is undefined.
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/machine/boot.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86/machine/boot.c b/arch/x86/machine/boot.c
index afc41d7..6934896 100644
--- a/arch/x86/machine/boot.c
+++ b/arch/x86/machine/boot.c
@@ -350,14 +350,17 @@ boot_setup_paging(struct multiboot_raw_info *mbi, unsigned long eax)
return pmap_setup_paging();
}
+#ifdef CONFIG_X86_PAE
+#define BOOT_PAE_LABEL " PAE"
+#else /* CONFIG_X86_PAE */
+#define BOOT_PAE_LABEL
+#endif /* CONFIG_X86_PAE */
+
void __init
boot_log_info(void)
{
log_info(KERNEL_NAME "/" CONFIG_SUBARCH " " KERNEL_VERSION
-#ifdef CONFIG_X86_PAE
- " PAE"
-#endif /* CONFIG_X86_PAE */
- );
+ BOOT_PAE_LABEL);
}
static void * __init