diff options
Diffstat (limited to 'src/network/networkd-address.c')
-rw-r--r-- | src/network/networkd-address.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 9e41244eb7..9d0311d76f 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -60,8 +60,9 @@ int address_new_static(Network *network, const char *filename, unsigned section_ assert(network); assert(ret); + assert(!!filename == (section_line > 0)); - if (section_line > 0) { + if (filename) { r = network_config_section_new(filename, section_line, &n); if (r < 0) return r; @@ -82,7 +83,7 @@ int address_new_static(Network *network, const char *filename, unsigned section_ if (r < 0) return r; - if (section_line > 0) { + if (filename) { address->section = n; hashmap_put(network->addresses_by_section, n, address); } |