From 2ee1c55d6c35c813e161787b6c147715377d8b29 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 3 Dec 2018 13:15:09 +0100 Subject: [PATCH] tree-wide: drop redundant space between __attribute__ and (( We follow no general rule, but in most cases we do not place a space outside of macro.h. Hence let's stick to that, and adapt macro.h too, and follow the rule systematically that there shall not be a space between __attribute__ and ((... Yes, this does not matter at all, and is purely OCD cosmetics. But then again, the uses of __attribute__ are very local only, hence the changes cleaning this up are small and are unlikely to have to be repeated too often... --- src/basic/macro.h | 26 +++++++++++++------------- src/boot/efi/measure.c | 4 ++-- src/systemd/_sd-common.h | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/basic/macro.h b/src/basic/macro.h index 4e37bed9caa..f8a8145de59 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -8,27 +8,27 @@ #include #include -#define _printf_(a, b) __attribute__ ((__format__(printf, a, b))) +#define _printf_(a, b) __attribute__((__format__(printf, a, b))) #ifdef __clang__ # define _alloc_(...) #else -# define _alloc_(...) __attribute__ ((__alloc_size__(__VA_ARGS__))) +# define _alloc_(...) __attribute__((__alloc_size__(__VA_ARGS__))) #endif -#define _sentinel_ __attribute__ ((__sentinel__)) +#define _sentinel_ __attribute__((__sentinel__)) #define _section_(x) __attribute__((__section__(x))) #define _used_ __attribute__((__used__)) -#define _unused_ __attribute__ ((__unused__)) -#define _destructor_ __attribute__ ((__destructor__)) -#define _pure_ __attribute__ ((__pure__)) -#define _const_ __attribute__ ((__const__)) -#define _deprecated_ __attribute__ ((__deprecated__)) -#define _packed_ __attribute__ ((__packed__)) -#define _malloc_ __attribute__ ((__malloc__)) -#define _weak_ __attribute__ ((__weak__)) +#define _unused_ __attribute__((__unused__)) +#define _destructor_ __attribute__((__destructor__)) +#define _pure_ __attribute__((__pure__)) +#define _const_ __attribute__((__const__)) +#define _deprecated_ __attribute__((__deprecated__)) +#define _packed_ __attribute__((__packed__)) +#define _malloc_ __attribute__((__malloc__)) +#define _weak_ __attribute__((__weak__)) #define _likely_(x) (__builtin_expect(!!(x), 1)) #define _unlikely_(x) (__builtin_expect(!!(x), 0)) -#define _public_ __attribute__ ((__visibility__("default"))) -#define _hidden_ __attribute__ ((__visibility__("hidden"))) +#define _public_ __attribute__((__visibility__("default"))) +#define _hidden_ __attribute__((__visibility__("hidden"))) #define _weakref_(x) __attribute__((__weakref__(#x))) #define _align_(x) __attribute__((__aligned__(x))) #define _alignas_(x) __attribute__((__aligned__(__alignof(x)))) diff --git a/src/boot/efi/measure.c b/src/boot/efi/measure.c index 9cb24f2fec8..243c80a8352 100644 --- a/src/boot/efi/measure.c +++ b/src/boot/efi/measure.c @@ -132,13 +132,13 @@ typedef struct { UINT16 HeaderVersion; UINT32 PCRIndex; UINT32 EventType; -} __attribute__ ((packed)) EFI_TCG2_EVENT_HEADER; +} __attribute__((packed)) EFI_TCG2_EVENT_HEADER; typedef struct tdEFI_TCG2_EVENT { UINT32 Size; EFI_TCG2_EVENT_HEADER Header; UINT8 Event[1]; -} __attribute__ ((packed)) EFI_TCG2_EVENT; +} __attribute__((packed)) EFI_TCG2_EVENT; typedef EFI_STATUS(EFIAPI * EFI_TCG2_GET_CAPABILITY) (IN EFI_TCG2_PROTOCOL * This, IN OUT EFI_TCG2_BOOT_SERVICE_CAPABILITY * ProtocolCapability); diff --git a/src/systemd/_sd-common.h b/src/systemd/_sd-common.h index b026b5c5517..6fd9244a016 100644 --- a/src/systemd/_sd-common.h +++ b/src/systemd/_sd-common.h @@ -25,7 +25,7 @@ #ifndef _sd_printf_ # if __GNUC__ >= 4 -# define _sd_printf_(a,b) __attribute__ ((__format__(printf, a, b))) +# define _sd_printf_(a,b) __attribute__((__format__(printf, a, b))) # else # define _sd_printf_(a,b) # endif -- 2.39.5