]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-netlink: pahole optimization of sd_netlink_slot
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 9 Feb 2021 18:51:50 +0000 (19:51 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 10 Feb 2021 13:43:10 +0000 (14:43 +0100)
commit399f74c79d27e06f22908bfbffbb28e207f5810b
treef063e23a4a12011cc6a6a41576e1d8debead0bb8
parent4d24463211cf3643a5c1a0ae4743f555408f49a8
sd-netlink: pahole optimization of sd_netlink_slot

By rearranging the fields, we can avoid one of the holes (on amd64).
By adding more space for .type, -EINVAL can be used as a value later on.
The structure is reduced from 96 to 88 bytes (on amd64).

Text size is also smaller:
-rwxrwxr-x 1 zbyszek zbyszek 4109832 Feb  9 19:50 build/libsystemd.so.0.30.0
-rwxrwxr-x 1 zbyszek zbyszek 4109792 Feb  9 19:51 build/libsystemd.so.0.30.0
src/libsystemd/sd-netlink/netlink-internal.h