From 7e43ebfbf9960a7237479e8a4e67830ae4d3a730 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 21 Feb 2019 11:46:51 +0900 Subject: [PATCH] network: propagate error from in_addr_is_null() --- src/network/networkd-address.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index b53461fd903..e057978400d 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -495,8 +495,9 @@ static int address_acquire(Link *link, Address *original, Address **ret) { assert(ret); /* Something useful was configured? just use it */ - if (in_addr_is_null(original->family, &original->in_addr) <= 0) - return 0; + r = in_addr_is_null(original->family, &original->in_addr); + if (r <= 0) + return r; /* The address is configured to be 0.0.0.0 or [::] by the user? * Then let's acquire something more useful from the pool. */ -- 2.47.3