[coreboot-gerrit] Patch set updated for coreboot: nvramcui: Use regular `if` over `#if` for `IS_ENABLED`

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Mon Mar 13 18:33:46 CET 2017


Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18794

-gerrit

commit 4d87503534e3e856e06e0a2b9ba9eff8bf319ac6
Author: Paul Menzel <pmenzel at molgen.mpg.de>
Date:   Mon Mar 13 17:56:17 2017 +0100

    nvramcui: Use regular `if` over `#if` for `IS_ENABLED`
    
    When using the regular `if` construct, the compiler will check the
    guarded code independently from the condition.
    
    Change-Id: I988fa9379e8c748013a67ef29fa908b4d9a970ad
    Signed-off-by: Paul Menzel <pmenzel at molgen.mpg.de>
---
 payloads/nvramcui/nvramcui.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/payloads/nvramcui/nvramcui.c b/payloads/nvramcui/nvramcui.c
index 9e12b97..675e002 100644
--- a/payloads/nvramcui/nvramcui.c
+++ b/payloads/nvramcui/nvramcui.c
@@ -176,9 +176,8 @@ int main(void)
 	int ch, done;
 	int i;
 
-#if IS_ENABLED(CONFIG_LP_USB)
-	usb_initialize();
-#endif
+	if (IS_ENABLED(CONFIG_LP_USB))
+		usb_initialize();
 
 	/* coreboot data structures */
 	lib_get_sysinfo();



More information about the coreboot-gerrit mailing list