Systemd/src/libsystemd/sd-netlink
Lennart Poettering ae2a15bc14 macro: introduce TAKE_PTR() macro
This macro will read a pointer of any type, return it, and set the
pointer to NULL. This is useful as an explicit concept of passing
ownership of a memory area between pointers.

This takes inspiration from Rust:

https://doc.rust-lang.org/std/option/enum.Option.html#method.take

and was suggested by Alan Jenkins (@sourcejedi).

It drops ~160 lines of code from our codebase, which makes me like it.
Also, I think it clarifies passing of ownership, and thus helps
readability a bit (at least for the initiated who know the new macro)
2018-03-22 20:21:42 +01:00
..
generic-netlink.c networkd: add support for wireguard interface type 2018-01-09 14:00:49 +01:00
local-addresses.c local-addresses: handle gracefully if routes lack an RTA_OIF attribute 2018-01-23 15:48:28 +01:00
local-addresses.h Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
netlink-internal.h sd-netlink: add generic netlink support 2018-01-09 14:00:49 +01:00
netlink-message.c macro: introduce TAKE_PTR() macro 2018-03-22 20:21:42 +01:00
netlink-socket.c fd-util: move certain fds above fd #2 (#8129) 2018-02-09 17:53:28 +01:00
netlink-types.c setup route expiration in kernel if supported 2018-03-12 11:36:25 +00:00
netlink-types.h networkd: add support for wireguard interface type 2018-01-09 14:00:49 +01:00
netlink-util.c sd-netlink: add generic netlink support 2018-01-09 14:00:49 +01:00
netlink-util.h sd-netlink: add generic netlink support 2018-01-09 14:00:49 +01:00
rtnl-message.c Add SPDX license identifiers to source files under the LGPL 2017-11-19 19:08:15 +01:00
sd-netlink.c log: minimize includes in log.h 2018-01-11 14:44:31 +01:00
test-local-addresses.c test-local-addresses: turn on debug logging by default 2018-01-23 15:47:56 +01:00
test-netlink.c sd-netlink: add generic netlink support 2018-01-09 14:00:49 +01:00