From: Heinrich Schuchardt Date: Fri, 31 Aug 2018 19:31:23 +0000 (+0200) Subject: vsprintf.c: use #if CONFIG_IS_ENABLED(EFI_LOADER) X-Git-Tag: v2018.11-rc1~82^2~102 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4ddcc4e5d28b80eacbcc97f67218a9ce5a326963;p=oweals%2Fu-boot.git vsprintf.c: use #if CONFIG_IS_ENABLED(EFI_LOADER) Using CONFIG_IS_ENABLED(EFI_LOADER) allows to simply the #if statements. Suggested-by: Alexander Graf Signed-off-by: Heinrich Schuchardt Signed-off-by: Alexander Graf --- diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 914fbd30cb..ef8b0b5989 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -294,8 +294,8 @@ static char *string16(char *buf, char *end, u16 *s, int field_width, return buf; } -#if defined(CONFIG_EFI_LOADER) && \ - !defined(CONFIG_SPL_BUILD) && !defined(API_BUILD) +/* Device paths only exist in the EFI context. */ +#if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD) static char *device_path_string(char *buf, char *end, void *dp, int field_width, int precision, int flags) { @@ -450,8 +450,8 @@ static char *pointer(const char *fmt, char *buf, char *end, void *ptr, #endif switch (*fmt) { -#if defined(CONFIG_EFI_LOADER) && \ - !defined(CONFIG_SPL_BUILD) && !defined(API_BUILD) +/* Device paths only exist in the EFI context. */ +#if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD) case 'D': return device_path_string(buf, end, ptr, field_width, precision, flags);