From: Yu Watanabe Date: Fri, 18 Dec 2020 04:00:57 +0000 (+0900) Subject: network: move variable declaration X-Git-Tag: v248-rc1~472^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=517fdd61ed6d4b7d5f5d2ef77b417d2b8f5b96cb;p=thirdparty%2Fsystemd.git network: move variable declaration --- diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index 32b84825279..0d21089d5cc 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -840,9 +840,9 @@ static int ndisc_router_process_route(Link *link, sd_ndisc_router *rt) { return log_link_error_errno(link, r, "Failed to get gateway address from RA: %m"); if (link_has_ipv6_address(link, &gateway.in6) == 0) { - _cleanup_free_ char *buf = NULL; - if (DEBUG_LOGGING) { + _cleanup_free_ char *buf = NULL; + (void) in_addr_to_string(AF_INET6, &gateway, &buf); log_link_debug(link, "Advertised route gateway, %s, is local to the link, ignoring route", strnull(buf)); }