diff options
author | Mark Salyzyn <salyzyn@google.com> | 2017-03-09 08:09:43 -0800 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2017-03-09 09:36:19 -0800 |
commit | 2ed51d708eda64516ec79ac6397f690de38f0075 (patch) | |
tree | 9ea938a4ee0461c443dc99e197827fc36ecd643b /liblog/log_portability.h | |
parent | c1b3c8ef2629eac2a73aa4a95bf43a66edf4cd0f (diff) | |
download | system_core-2ed51d708eda64516ec79ac6397f690de38f0075.tar.gz system_core-2ed51d708eda64516ec79ac6397f690de38f0075.tar.bz2 system_core-2ed51d708eda64516ec79ac6397f690de38f0075.zip |
liblog: specify clang format
Switch coding style to match
SideEffects: None
Test: compile
Bug: 27405083
Change-Id: Id426d5c5e3b18f2ceec22b31bbc9781aabf6bcca
Diffstat (limited to 'liblog/log_portability.h')
-rw-r--r-- | liblog/log_portability.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/liblog/log_portability.h b/liblog/log_portability.h index 3ad20601e..88805c75f 100644 --- a/liblog/log_portability.h +++ b/liblog/log_portability.h @@ -46,7 +46,7 @@ #if defined(_WIN32) #define LIBLOG_WEAK static /* Accept that it is totally private */ #else -#define LIBLOG_WEAK __attribute__((weak,visibility("default"))) +#define LIBLOG_WEAK __attribute__((weak, visibility("default"))) #endif /* possible missing definitions in sys/cdefs.h */ @@ -54,8 +54,8 @@ /* DECLS */ #ifndef __BEGIN_DECLS #if defined(__cplusplus) -#define __BEGIN_DECLS extern "C" { -#define __END_DECLS } +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } #else #define __BEGIN_DECLS #define __END_DECLS @@ -64,19 +64,21 @@ /* Unused argument. For C code only, remove symbol name for C++ */ #ifndef __unused -#define __unused __attribute__((__unused__)) +#define __unused __attribute__((__unused__)) #endif /* possible missing definitions in unistd.h */ #ifndef TEMP_FAILURE_RETRY /* Used to retry syscalls that can return EINTR. */ -#define TEMP_FAILURE_RETRY(exp) ({ \ +#define TEMP_FAILURE_RETRY(exp) \ + ({ \ __typeof__(exp) _rc; \ do { \ - _rc = (exp); \ + _rc = (exp); \ } while (_rc == -1 && errno == EINTR); \ - _rc; }) + _rc; \ + }) #endif #endif /* _LIBLOG_PORTABILITY_H__ */ |