From d9876a527f62e85c3c972bc5f45ad872cb4958c1 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sat, 14 Jun 2014 15:03:56 +0200 Subject: 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 --- src/network/networkd-link.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/network') diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index baa0756e6f..452fcd43c2 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -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; -- cgit v1.2.3-54-g00ecf