From 517fdd61ed6d4b7d5f5d2ef77b417d2b8f5b96cb Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 18 Dec 2020 13:00:57 +0900 Subject: [PATCH] network: move variable declaration --- src/network/networkd-ndisc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index 32b8482527..0d21089d5c 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)); }