1
0
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:
Lennart Poettering 2024-06-24 16:08:50 +02:00
parent ba81c365f8
commit 515e1e6d35
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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)))