Merge pull request #10976 from yuwata/typesafe-netlink-call

netlink: introduce typesafe netlink functions
This commit is contained in:
Lennart Poettering
2018-12-03 17:55:00 +01:00
committed by GitHub
30 changed files with 224 additions and 247 deletions

View File

@@ -458,6 +458,11 @@ static inline int __coverity_check__(int condition) {
#endif
#endif
#define DEFINE_TRIVIAL_DESTRUCTOR(name, type, func) \
static inline void name(type *p) { \
func(p); \
}
#define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func) \
static inline void func##p(type *p) { \
if (*p) \