mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
macro: move PTR_TO_SIZE() macros to fundamental
This commit is contained in:
parent
ba81c365f8
commit
515e1e6d35
@ -211,9 +211,6 @@ static inline int __coverity_check_and_return__(int condition) {
|
||||
#define PTR_TO_UINT64(p) ((uint64_t) ((uintptr_t) (p)))
|
||||
#define UINT64_TO_PTR(u) ((void *) ((uintptr_t) (u)))
|
||||
|
||||
#define PTR_TO_SIZE(p) ((size_t) ((uintptr_t) (p)))
|
||||
#define SIZE_TO_PTR(u) ((void *) ((uintptr_t) (u)))
|
||||
|
||||
#define CHAR_TO_STR(x) ((char[2]) { x, 0 })
|
||||
|
||||
#define char_array_0(x) x[sizeof(x)-1] = 0;
|
||||
|
@ -561,3 +561,6 @@ static inline uint64_t ALIGN_OFFSET_U64(uint64_t l, uint64_t ali) {
|
||||
|
||||
#define FOREACH_ELEMENT(i, array) \
|
||||
FOREACH_ARRAY(i, array, ELEMENTSOF(array))
|
||||
|
||||
#define PTR_TO_SIZE(p) ((size_t) ((uintptr_t) (p)))
|
||||
#define SIZE_TO_PTR(u) ((void *) ((uintptr_t) (u)))
|
||||
|
Loading…
Reference in New Issue
Block a user