1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

networkd: add assert

It should not be possible to have a DHCP lease on a link without also having
an associated network. Add assert() to avoid compiler warnings.

Reported by Thomas H. P. Andersen
This commit is contained in:
Tom Gundersen 2014-06-14 15:03:56 +02:00
parent efdc73dae3
commit d9876a527f

View File

@ -2152,6 +2152,8 @@ int link_save(Link *link) {
}
if (link->dhcp_lease) {
assert(link->network);
r = dhcp_lease_save(link->dhcp_lease, link->lease_file);
if (r < 0)
goto finish;