]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
macro: move PTR_TO_SIZE() macros to fundamental
authorLennart Poettering <lennart@poettering.net>
Mon, 24 Jun 2024 14:08:50 +0000 (16:08 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 26 Jun 2024 14:01:20 +0000 (16:01 +0200)
src/basic/macro.h
src/fundamental/macro-fundamental.h

index 8343528e85b5eb087f640155384b83ddec6e2c7a..7e2bc628dbf95a6c3368e6e9463c568544165641 100644 (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;
index 38230c5f19d81e69bc2ef3601c90a4e31257f5ff..913c8b253c67fe68b58bf388a54821d18203d329 100644 (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)))