diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-12-06 02:39:15 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-12-08 14:55:22 +0100 |
commit | 5f86c1f4c43ee9caa120d130e9b89d3fd25124c0 (patch) | |
tree | 34908816bfd429ba578f99626eb2deabc1ed631a /src/shared/macro.h | |
parent | 8b5e2af10830d55b2032e6c79d0cd1f959bb5b7f (diff) |
sd-bus: rework ELF error mapping table magic
The ELF magic cannot work for consumers of our shard library, since they
are in a different module. Hence make all the ELF magic private, and
instead introduce a public function to register additional static
mapping table.
Diffstat (limited to 'src/shared/macro.h')
-rw-r--r-- | src/shared/macro.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/macro.h b/src/shared/macro.h index 9f5e4552b4..548294e47b 100644 --- a/src/shared/macro.h +++ b/src/shared/macro.h @@ -95,15 +95,15 @@ #error "Wut? Pointers are neither 4 nor 8 bytes long?" #endif -#define ALIGN_PTR(p) ((void*) ALIGN((unsigned long) p)) -#define ALIGN4_PTR(p) ((void*) ALIGN4((unsigned long) p)) -#define ALIGN8_PTR(p) ((void*) ALIGN8((unsigned long) p)) +#define ALIGN_PTR(p) ((void*) ALIGN((unsigned long) (p))) +#define ALIGN4_PTR(p) ((void*) ALIGN4((unsigned long) (p))) +#define ALIGN8_PTR(p) ((void*) ALIGN8((unsigned long) (p))) static inline size_t ALIGN_TO(size_t l, size_t ali) { return ((l + ali - 1) & ~(ali - 1)); } -#define ALIGN_TO_PTR(p, ali) ((void*) ALIGN_TO((unsigned long) p, ali)) +#define ALIGN_TO_PTR(p, ali) ((void*) ALIGN_TO((unsigned long) (p), (ali))) /* align to next higher power-of-2 (except for: 0 => 0, overflow => 0) */ static inline unsigned long ALIGN_POWER2(unsigned long u) { |