Merge pull request #26438 from poettering/event-source-shorten

sd-event: reduce memory use of sd_event_source objects
This commit is contained in:
Lennart Poettering
2023-02-17 12:46:55 +01:00
committed by GitHub
2 changed files with 34 additions and 9 deletions
+1
View File
@@ -248,6 +248,7 @@ static inline int __coverity_check_and_return__(int condition) {
#define char_array_0(x) x[sizeof(x)-1] = 0;
#define sizeof_field(struct_type, member) sizeof(((struct_type *) 0)->member)
#define endoffsetof_field(struct_type, member) (offsetof(struct_type, member) + sizeof_field(struct_type, member))
/* Returns the number of chars needed to format variables of the specified type as a decimal string. Adds in
* extra space for a negative '-' prefix for signed types. Includes space for the trailing NUL. */